diff options
| author | yo mama <pepper@scannerjammer.com> | 2015-01-11 01:51:16 -0800 |
|---|---|---|
| committer | yo mama <pepper@scannerjammer.com> | 2015-01-11 01:51:16 -0800 |
| commit | 2c0487d5faef3b9daf038feeffacd9caac46f5ff (patch) | |
| tree | 407cf5d4bb5d36068e8298ad3d072158fac49c45 /src | |
Diffstat (limited to 'src')
| -rw-r--r-- | src/.deps/cli-dssi-host.Po | 195 | ||||
| -rw-r--r-- | src/Makefile | 561 | ||||
| -rw-r--r-- | src/Makefile.am | 9 | ||||
| -rw-r--r-- | src/Makefile.in | 561 | ||||
| -rwxr-xr-x | src/cli-dssi-host | bin | 0 -> 60514 bytes | |||
| -rw-r--r-- | src/cli-dssi-host.c | 609 | ||||
| -rw-r--r-- | src/cli-dssi-host.h | 291 | ||||
| -rw-r--r-- | src/cli-dssi-host.o | bin | 0 -> 116768 bytes | |||
| -rw-r--r-- | src/lts.prs | 1 |
9 files changed, 2227 insertions, 0 deletions
diff --git a/src/.deps/cli-dssi-host.Po b/src/.deps/cli-dssi-host.Po new file mode 100644 index 0000000..dbbc122 --- /dev/null +++ b/src/.deps/cli-dssi-host.Po @@ -0,0 +1,195 @@ +cli-dssi-host.o: cli-dssi-host.c /usr/include/stdc-predef.h \ + cli-dssi-host.h /usr/include/sndfile.h /usr/include/stdio.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \ + /usr/include/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/typesizes.h \ + /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/bits/stdio.h /usr/include/sys/types.h /usr/include/time.h \ + /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/bits/byteswap.h /usr/include/bits/byteswap-16.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/bits/time.h \ + /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \ + /usr/include/ladspa.h /usr/include/dssi.h /usr/include/alsa/seq_event.h \ + /usr/include/stdlib.h /usr/include/bits/waitflags.h \ + /usr/include/bits/waitstatus.h /usr/include/alloca.h \ + /usr/include/bits/stdlib-bsearch.h /usr/include/bits/stdlib-float.h \ + /usr/include/string.h /usr/include/xlocale.h /usr/include/bits/string.h \ + /usr/include/bits/string2.h /usr/include/assert.h /usr/include/dlfcn.h \ + /usr/include/bits/dlfcn.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \ + /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/math.h \ + /usr/include/bits/huge_val.h /usr/include/bits/huge_valf.h \ + /usr/include/bits/huge_vall.h /usr/include/bits/inf.h \ + /usr/include/bits/nan.h /usr/include/bits/mathdef.h \ + /usr/include/bits/mathcalls.h /usr/include/bits/mathinline.h \ + /usr/include/sys/stat.h /usr/include/bits/stat.h /usr/include/sys/time.h \ + /usr/include/sys/wait.h /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/bits/sigstack.h \ + /usr/include/sys/ucontext.h /usr/include/bits/sigthread.h \ + /usr/include/dirent.h /usr/include/bits/dirent.h \ + /usr/include/bits/posix1_lim.h /usr/include/bits/local_lim.h \ + /usr/include/linux/limits.h /usr/include/libgen.h + +/usr/include/stdc-predef.h: + +cli-dssi-host.h: + +/usr/include/sndfile.h: + +/usr/include/stdio.h: + +/usr/include/features.h: + +/usr/include/sys/cdefs.h: + +/usr/include/bits/wordsize.h: + +/usr/include/gnu/stubs.h: + +/usr/include/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/include/stddef.h: + +/usr/include/bits/types.h: + +/usr/include/bits/typesizes.h: + +/usr/include/libio.h: + +/usr/include/_G_config.h: + +/usr/include/wchar.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/include/stdarg.h: + +/usr/include/bits/stdio_lim.h: + +/usr/include/bits/sys_errlist.h: + +/usr/include/bits/stdio.h: + +/usr/include/sys/types.h: + +/usr/include/time.h: + +/usr/include/endian.h: + +/usr/include/bits/endian.h: + +/usr/include/bits/byteswap.h: + +/usr/include/bits/byteswap-16.h: + +/usr/include/sys/select.h: + +/usr/include/bits/select.h: + +/usr/include/bits/sigset.h: + +/usr/include/bits/time.h: + +/usr/include/sys/sysmacros.h: + +/usr/include/bits/pthreadtypes.h: + +/usr/include/ladspa.h: + +/usr/include/dssi.h: + +/usr/include/alsa/seq_event.h: + +/usr/include/stdlib.h: + +/usr/include/bits/waitflags.h: + +/usr/include/bits/waitstatus.h: + +/usr/include/alloca.h: + +/usr/include/bits/stdlib-bsearch.h: + +/usr/include/bits/stdlib-float.h: + +/usr/include/string.h: + +/usr/include/xlocale.h: + +/usr/include/bits/string.h: + +/usr/include/bits/string2.h: + +/usr/include/assert.h: + +/usr/include/dlfcn.h: + +/usr/include/bits/dlfcn.h: + +/usr/include/unistd.h: + +/usr/include/bits/posix_opt.h: + +/usr/include/bits/environments.h: + +/usr/include/bits/confname.h: + +/usr/include/getopt.h: + +/usr/include/math.h: + +/usr/include/bits/huge_val.h: + +/usr/include/bits/huge_valf.h: + +/usr/include/bits/huge_vall.h: + +/usr/include/bits/inf.h: + +/usr/include/bits/nan.h: + +/usr/include/bits/mathdef.h: + +/usr/include/bits/mathcalls.h: + +/usr/include/bits/mathinline.h: + +/usr/include/sys/stat.h: + +/usr/include/bits/stat.h: + +/usr/include/sys/time.h: + +/usr/include/sys/wait.h: + +/usr/include/signal.h: + +/usr/include/bits/signum.h: + +/usr/include/bits/siginfo.h: + +/usr/include/bits/sigaction.h: + +/usr/include/bits/sigcontext.h: + +/usr/include/bits/sigstack.h: + +/usr/include/sys/ucontext.h: + +/usr/include/bits/sigthread.h: + +/usr/include/dirent.h: + +/usr/include/bits/dirent.h: + +/usr/include/bits/posix1_lim.h: + +/usr/include/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/libgen.h: diff --git a/src/Makefile b/src/Makefile new file mode 100644 index 0000000..2fb8c1d --- /dev/null +++ b/src/Makefile @@ -0,0 +1,561 @@ +# Makefile.in generated by automake 1.14.1 from Makefile.am. +# src/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994-2013 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. + + + + +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +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)/cli-dssi-host +pkgincludedir = $(includedir)/cli-dssi-host +pkglibdir = $(libdir)/cli-dssi-host +pkglibexecdir = $(libexecdir)/cli-dssi-host +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 = : +bin_PROGRAMS = cli-dssi-host$(EXEEXT) +subdir = src +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/mkinstalldirs $(top_srcdir)/depcomp +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +PROGRAMS = $(bin_PROGRAMS) +am_cli_dssi_host_OBJECTS = cli-dssi-host.$(OBJEXT) +cli_dssi_host_OBJECTS = $(am_cli_dssi_host_OBJECTS) +am__DEPENDENCIES_1 = +am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) +cli_dssi_host_DEPENDENCIES = $(am__DEPENDENCIES_2) +AM_V_P = $(am__v_P_$(V)) +am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I. +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) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(cli_dssi_host_SOURCES) +DIST_SOURCES = $(cli_dssi_host_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +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 +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = aclocal-1.14 +ALSA_CFLAGS = -I/usr/include/alsa +ALSA_LIBS = -lasound +AMTAR = $${TAR-tar} +AM_DEFAULT_VERBOSITY = 1 +AUTOCONF = autoconf +AUTOHEADER = autoheader +AUTOMAKE = automake-1.14 +AWK = gawk +CC = gcc +CCDEPMODE = depmode=gcc3 +CFLAGS = -g -O2 +CPPFLAGS = +CYGPATH_W = echo +DEFS = -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"cli-dssi-host\" -DVERSION=\"0.1.3\" +DEPDIR = .deps +DSSI_CFLAGS = +DSSI_LIBS = +ECHO_C = +ECHO_N = -n +ECHO_T = +EXEEXT = +INSTALL = /usr/bin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +LDFLAGS = +LIBOBJS = +LIBS = +LTLIBOBJS = +MAKEINFO = makeinfo +MKDIR_P = /usr/bin/mkdir -p +OBJEXT = o +PACKAGE = cli-dssi-host +PACKAGE_BUGREPORT = +PACKAGE_NAME = +PACKAGE_STRING = +PACKAGE_TARNAME = +PACKAGE_URL = +PACKAGE_VERSION = +PATH_SEPARATOR = : +PKG_CONFIG = /usr/bin/pkg-config +PKG_CONFIG_LIBDIR = +PKG_CONFIG_PATH = +SET_MAKE = +SHELL = /bin/sh +SNDFILE_CFLAGS = +SNDFILE_LIBS = -lsndfile +STRIP = +VERSION = 0.1.3 +abs_builddir = /home/pepper/cli-dssi-host-0.1.3/src +abs_srcdir = /home/pepper/cli-dssi-host-0.1.3/src +abs_top_builddir = /home/pepper/cli-dssi-host-0.1.3 +abs_top_srcdir = /home/pepper/cli-dssi-host-0.1.3 +ac_ct_CC = gcc +am__include = include +am__leading_dot = . +am__quote = +am__tar = $${TAR-tar} chof - "$$tardir" +am__untar = $${TAR-tar} xf - +bindir = ${exec_prefix}/bin +build_alias = +builddir = . +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE} +dvidir = ${docdir} +exec_prefix = ${prefix} +host_alias = +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = ${SHELL} /home/pepper/cli-dssi-host-0.1.3/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = $(MKDIR_P) +oldincludedir = /usr/include +pdfdir = ${docdir} +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +srcdir = . +sysconfdir = ${prefix}/etc +target_alias = +top_build_prefix = ../ +top_builddir = .. +top_srcdir = .. +AM_CFLAGS = -Wall -std=c99 $(DSSI_CFLAGS) $(SNDFILE_CFLAGS) $(ALSA_CFLAGS) +AM_LIBS = $(DSSI_LIBS) $(SNDFILE_LIBS) $(ALSA_LIBS) +cli_dssi_host_SOURCES = cli-dssi-host.c cli-dssi-host.h +cli_dssi_host_LDADD = $(AM_LIBS) -lm -ldl +EXTRA_DIST = lts.prs +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .o .obj +$(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 src/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/Makefile +.PRECIOUS: 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): +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 \ + ; 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) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(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: + -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) + +cli-dssi-host$(EXEEXT): $(cli_dssi_host_OBJECTS) $(cli_dssi_host_DEPENDENCIES) $(EXTRA_cli_dssi_host_DEPENDENCIES) + @rm -f cli-dssi-host$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(cli_dssi_host_OBJECTS) $(cli_dssi_host_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +include ./$(DEPDIR)/cli-dssi-host.Po + +.c.o: + $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< + $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# $(AM_V_CC)source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(COMPILE) -c -o $@ $< + +.c.obj: + $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` + $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# $(AM_V_CC)source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(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-am + +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" +cscopelist: cscopelist-am + +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 + +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 $(PROGRAMS) +installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +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." +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +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-binPROGRAMS + +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 -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ + clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ + distclean distclean-compile distclean-generic distclean-tags \ + distdir dvi dvi-am html html-am info info-am install \ + install-am install-binPROGRAMS 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-compile mostlyclean-generic pdf pdf-am \ + ps ps-am tags tags-am uninstall uninstall-am \ + uninstall-binPROGRAMS + + +# 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: diff --git a/src/Makefile.am b/src/Makefile.am new file mode 100644 index 0000000..04ab2a8 --- /dev/null +++ b/src/Makefile.am @@ -0,0 +1,9 @@ +bin_PROGRAMS = cli-dssi-host + +AM_CFLAGS = -Wall -std=c99 $(DSSI_CFLAGS) $(SNDFILE_CFLAGS) $(ALSA_CFLAGS) +AM_LIBS = $(DSSI_LIBS) $(SNDFILE_LIBS) $(ALSA_LIBS) + +cli_dssi_host_SOURCES = cli-dssi-host.c cli-dssi-host.h +cli_dssi_host_LDADD = $(AM_LIBS) -lm -ldl + +EXTRA_DIST = lts.prs diff --git a/src/Makefile.in b/src/Makefile.in new file mode 100644 index 0000000..919c67c --- /dev/null +++ b/src/Makefile.in @@ -0,0 +1,561 @@ +# Makefile.in generated by automake 1.14.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2013 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 = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +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 = : +bin_PROGRAMS = cli-dssi-host$(EXEEXT) +subdir = src +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/mkinstalldirs $(top_srcdir)/depcomp +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +PROGRAMS = $(bin_PROGRAMS) +am_cli_dssi_host_OBJECTS = cli-dssi-host.$(OBJEXT) +cli_dssi_host_OBJECTS = $(am_cli_dssi_host_OBJECTS) +am__DEPENDENCIES_1 = +am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) +cli_dssi_host_DEPENDENCIES = $(am__DEPENDENCIES_2) +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@ +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) +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 = $(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 = $(cli_dssi_host_SOURCES) +DIST_SOURCES = $(cli_dssi_host_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +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 +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALSA_CFLAGS = @ALSA_CFLAGS@ +ALSA_LIBS = @ALSA_LIBS@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSSI_CFLAGS = @DSSI_CFLAGS@ +DSSI_LIBS = @DSSI_LIBS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EXEEXT = @EXEEXT@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +OBJEXT = @OBJEXT@ +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@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SNDFILE_CFLAGS = @SNDFILE_CFLAGS@ +SNDFILE_LIBS = @SNDFILE_LIBS@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +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_alias = @build_alias@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host_alias = @host_alias@ +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@ +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@ +AM_CFLAGS = -Wall -std=c99 $(DSSI_CFLAGS) $(SNDFILE_CFLAGS) $(ALSA_CFLAGS) +AM_LIBS = $(DSSI_LIBS) $(SNDFILE_LIBS) $(ALSA_LIBS) +cli_dssi_host_SOURCES = cli-dssi-host.c cli-dssi-host.h +cli_dssi_host_LDADD = $(AM_LIBS) -lm -ldl +EXTRA_DIST = lts.prs +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .o .obj +$(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 src/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/Makefile +.PRECIOUS: 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): +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 \ + ; 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) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(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: + -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) + +cli-dssi-host$(EXEEXT): $(cli_dssi_host_OBJECTS) $(cli_dssi_host_DEPENDENCIES) $(EXTRA_cli_dssi_host_DEPENDENCIES) + @rm -f cli-dssi-host$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(cli_dssi_host_OBJECTS) $(cli_dssi_host_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cli-dssi-host.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.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)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.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) '$<'` + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(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-am + +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" +cscopelist: cscopelist-am + +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 + +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 $(PROGRAMS) +installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +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." +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +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-binPROGRAMS + +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 -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ + clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ + distclean distclean-compile distclean-generic distclean-tags \ + distdir dvi dvi-am html html-am info info-am install \ + install-am install-binPROGRAMS 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-compile mostlyclean-generic pdf pdf-am \ + ps ps-am tags tags-am uninstall uninstall-am \ + uninstall-binPROGRAMS + + +# 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: diff --git a/src/cli-dssi-host b/src/cli-dssi-host Binary files differnew file mode 100755 index 0000000..a67ae19 --- /dev/null +++ b/src/cli-dssi-host diff --git a/src/cli-dssi-host.c b/src/cli-dssi-host.c new file mode 100644 index 0000000..3ee263b --- /dev/null +++ b/src/cli-dssi-host.c @@ -0,0 +1,609 @@ +/* cli-dssi-host.c + * Copyright (C) 2005 James McDermott + * jamesmichaelmcdermott@gmail.com + * + * This program is derived from jack-dssi-host (Copyright 2004 Chris + * Cannam, Steve Harris and Sean Bolton). + * + * 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., 59 Temple Place, Suite 330, Boston, MA 01222-1307 + * USA + */ + +#include "cli-dssi-host.h" + +void +print_usage(void) { + fprintf(stderr, "A command-line DSSI host.\n"); + fprintf(stderr, "Usage:\n"); + fprintf(stderr, "$ %s <dssi_plugin.so>[%c<label>]\n", my_name, LABEL_SEP); + fprintf(stderr, " [-p [<bank>%c]<preset>] " + "(use -p -1 for default port values;\n " + "-p -2 for random values; omit -p to read port values from stdin)\n", + BANK_SEP); + fprintf(stderr, " [-l <length>] (in seconds, between note-on and note-off; default is 1s)\n"); + fprintf(stderr, " [-r <release_tail>] (in seconds: amount of data to allow after note-off;\n default waits until silence (up to a maximum of 15s))\n"); + fprintf(stderr, " [-f <output_file.wav>] (default == \"output.wav\")\n"); + fprintf(stderr, " [-c <no_channels>] (default == 1; use -c -1 to use plugin's channel count)\n"); + fprintf(stderr, " [-n <midi_note_no>] (default == 60)\n"); + fprintf(stderr, " [-v <midi_velocity>] (default == 127)\n"); + fprintf(stderr, " [-d <project_directory>]\n"); + fprintf(stderr, " [-k <configure_key>%c<value>] ...\n", KEYVAL_SEP); + fprintf(stderr, " [-b] (clip out-of-bounds values, including Inf and NaN, to within bounds\n (calls exit()) if -b is omitted)\n"); + exit(1); +} + +int +main(int argc, char **argv) { + + my_name = basename(argv[0]); + + DSSI_Descriptor_Function descfn; + const DSSI_Descriptor *descriptor; + LADSPA_Handle instanceHandle; + void *pluginObject; + + SNDFILE *outfile; + SF_INFO outsfinfo; + + char **configure_key = NULL; + char **configure_val = NULL; + char *directory = NULL; + char *dllName = NULL; + char *label; + char *output_file = "output.wav"; + char *projectDirectory = NULL; + + int in, out, controlIn, controlOut; + int ins, outs, controlIns, controlOuts; + port_vals_source_t src = from_stdin; + int nchannels = 1; + int midi_velocity = 127; + int midi_note = 60; + int bank = 0; + int program_no = 0; + int nkeys = 0; + int clip = 0; + int have_warned = 0; + + + size_t length = SAMPLE_RATE; + size_t release_tail = -1; + size_t nframes = 256; + size_t total_written = 0; + size_t items_written = 0; + + float **pluginInputBuffers, **pluginOutputBuffers; + float *pluginControlIns, *pluginControlOuts; + + sample_rate = SAMPLE_RATE; + + /* Probably an unorthodox srandom() technique... */ + struct timeval tv; + struct timezone tz; + gettimeofday(&tv, &tz); + srandom(tv.tv_sec + tv.tv_usec); + + if (argc < 2) { + print_usage(); + } + + /* dll name is argv[1]: parse dll name, plus a label if supplied */ + parse_keyval(argv[1], LABEL_SEP, &dllName, &label); + + for (int i = 2; i < argc; i++) { + if (DEBUG) { + fprintf(stderr, "%s: processing options: argv[%d] = %s\n", + my_name, i, argv[i]); + } + + /* Deal with flags */ + if (!strcmp(argv[i], "-b")) { + clip = 1; + continue; + } else { + /* It's not a flag, so expect option + argument */ + if (argc <= i + 1) print_usage(); + } + + if (!strcmp(argv[i], "-c")) { + nchannels = strtol(argv[++i], NULL, 0); + } else if (!strcmp(argv[i], "-f")) { + output_file = argv[++i]; + } else if (!strcmp(argv[i], "-n")) { + midi_note = strtol(argv[++i], NULL, 0); + } else if (!strcmp(argv[i], "-v")) { + midi_velocity = strtol(argv[++i], NULL, 0); + } else if (!strcmp(argv[i], "-d")) { + projectDirectory = argv[++i]; + } else if (!strcmp(argv[i], "-l")) { + length = sample_rate * strtof(argv[++i], NULL); + } else if (!strcmp(argv[i], "-r")) { + release_tail = sample_rate * strtof(argv[++i], NULL); + } else if (!strcmp(argv[i], "-k")) { + configure_key = realloc(configure_key, (nkeys + 1) * sizeof(char *)); + configure_val = realloc(configure_val, (nkeys + 1) * sizeof(char *)); + parse_keyval(argv[++i], KEYVAL_SEP, &configure_key[nkeys], + &configure_val[nkeys]); + nkeys++; + + } else if (!strcmp(argv[i], "-p")) { + char *first_str; + char *second_str; + parse_keyval(argv[++i], BANK_SEP, &first_str, &second_str); + if (second_str) { + bank = strtol(first_str, NULL, 0); + program_no = strtol(second_str, NULL, 0); + } else { + program_no = strtol(first_str, NULL, 0); + bank = 0; + } + if (program_no == -1) { + src = from_defaults; + } else if (program_no == -2) { + src = from_random; + } else { + src = from_preset; + } + } else { + fprintf(stderr, "%s: Error: Unknown option: %s\n", my_name, argv[i]); + print_usage(); + } + } + + if (DEBUG) { + for (int i = 0; i < nkeys; i++) { + printf("key %d: %s; value: %s\n", i, configure_key[i], + configure_val[i]); + } + } + + if (DEBUG) { + fprintf(stderr, "%s: Cmd-line args ok\n", my_name); + } + + directory = load(dllName, &pluginObject, 0); + if (!directory || !pluginObject) { + fprintf(stderr, "\n%s: Error: Failed to load plugin library \"%s\"\n", + my_name, dllName); + return 1; + } + + descfn = (DSSI_Descriptor_Function)dlsym(pluginObject, + "dssi_descriptor"); + + if (!descfn) { + fprintf(stderr, "%s: Error: Not a DSSI plugin\n", my_name); + exit(1); + } + + + /* Get the plugin descriptor and check the run_synth*() function + * exists */ + int j = 0; + descriptor = NULL; + const DSSI_Descriptor *desc; + + while ((desc = descfn(j++))) { + if (!label || + !strcmp(desc->LADSPA_Plugin->Label, label)) { + descriptor = desc; + break; + } + } + + if (!descriptor) { + fprintf(stderr, + "\n%s: Error: Plugin label \"%s\" not found in library \"%s\"\n", + my_name, label ? label : "(none)", dllName); + return 1; + } + + if (!descriptor->run_synth + && !descriptor->run_multiple_synths) { + fprintf(stderr, "%s: Error: No run_synth() or run_multiple_synths() method in plugin\n", my_name); + exit(1); + } + + if (!label) { + label = strdup(descriptor->LADSPA_Plugin->Label); + } + + /* Count number of i/o buffers and ports required */ + ins = 0; + outs = 0; + controlIns = 0; + controlOuts = 0; + + for (int j = 0; j < descriptor->LADSPA_Plugin->PortCount; j++) { + LADSPA_PortDescriptor pod = + descriptor->LADSPA_Plugin->PortDescriptors[j]; + + if (LADSPA_IS_PORT_AUDIO(pod)) { + + if (LADSPA_IS_PORT_INPUT(pod)) ++ins; + else if (LADSPA_IS_PORT_OUTPUT(pod)) ++outs; + + } else if (LADSPA_IS_PORT_CONTROL(pod)) { + + if (LADSPA_IS_PORT_INPUT(pod)) ++controlIns; + else if (LADSPA_IS_PORT_OUTPUT(pod)) ++controlOuts; + } + } + + if (!outs) { + fprintf(stderr, "%s: Error: no audio output ports\n", my_name); + exit(1); + } + if (nchannels == -1) { + nchannels = outs; + } + + /* Create buffers */ + + pluginInputBuffers = (float **)malloc(ins * sizeof(float *)); + pluginControlIns = (float *)calloc(controlIns, sizeof(float)); + + pluginOutputBuffers = (float **)malloc(outs * sizeof(float *)); + pluginControlOuts = (float *)calloc(controlOuts, sizeof(float)); + + for (int i = 0; i < outs; i++) { + pluginOutputBuffers[i] = (float *)calloc(nframes, sizeof(float)); + } + + + + /* Instantiate plugin */ + + instanceHandle = descriptor->LADSPA_Plugin->instantiate + (descriptor->LADSPA_Plugin, sample_rate); + if (!instanceHandle) { + fprintf(stderr, + "\n%s: Error: Failed to instantiate instance %d!, plugin \"%s\"\n", + my_name, 0, label); + return 1; + } + + /* Connect ports */ + + in = out = controlIn = controlOut = 0; + for (int j = 0; j < descriptor->LADSPA_Plugin->PortCount; j++) { + /* j is LADSPA port number */ + + LADSPA_PortDescriptor pod = + descriptor->LADSPA_Plugin->PortDescriptors[j]; + + if (LADSPA_IS_PORT_AUDIO(pod)) { + + if (LADSPA_IS_PORT_INPUT(pod)) { + descriptor->LADSPA_Plugin->connect_port + (instanceHandle, j, pluginInputBuffers[in++]); + + } else if (LADSPA_IS_PORT_OUTPUT(pod)) { + descriptor->LADSPA_Plugin->connect_port + (instanceHandle, j, pluginOutputBuffers[out++]); + } + + } else if (LADSPA_IS_PORT_CONTROL(pod)) { + + if (LADSPA_IS_PORT_INPUT(pod)) { + + descriptor->LADSPA_Plugin->connect_port + (instanceHandle, j, &pluginControlIns[controlIn++]); + + } else if (LADSPA_IS_PORT_OUTPUT(pod)) { + descriptor->LADSPA_Plugin->connect_port + (instanceHandle, j, &pluginControlOuts[controlOut++]); + } + } + } /* 'for (j...' LADSPA port number */ + + + + /* Set the control port values */ + + if (src == from_preset) { + /* Set the ports according to a preset */ + if (descriptor->select_program) { + descriptor->select_program(instanceHandle, bank, program_no); + } + } else { + /* Assign values to control ports: defaults, random, or from stdin */ + controlIn = 0; + for (int j = 0; j < descriptor->LADSPA_Plugin->PortCount; j++) { + /* j is LADSPA port number */ + + LADSPA_PortDescriptor pod = + descriptor->LADSPA_Plugin->PortDescriptors[j]; + + if (LADSPA_IS_PORT_CONTROL(pod) && LADSPA_IS_PORT_INPUT(pod)) { + LADSPA_Data val; + if (src == from_defaults) { + val = get_port_default(descriptor->LADSPA_Plugin, j); + } else if (src == from_stdin) { + scanf("%f", &val); + } else if (src == from_random) { + val = get_port_random(descriptor->LADSPA_Plugin, j); + } + pluginControlIns[controlIn] = val; + controlIn++; + } + } + } + + + /* It can happen that a control port is set wrongly after + * select_program(): for example xsynth-dssi does not set its tuning + * port in the select_program() call (which makes sense: xsynth + * users might want to be able to keep their current tuning while + * changing presets). Here, if we call select_program() we'll get + * tuning = 0.0, and we don't get any sound. There might be other + * bad effects in other cases. One solution is to read all the + * control-in values and if they're not in range, reset them using + * get_default(). + */ + + controlIn = 0; + for (int j = 0; j < descriptor->LADSPA_Plugin->PortCount; j++) { + /* j is LADSPA port number */ + + LADSPA_PortDescriptor pod = + descriptor->LADSPA_Plugin->PortDescriptors[j]; + + if (LADSPA_IS_PORT_CONTROL(pod) && LADSPA_IS_PORT_INPUT(pod)) { + + LADSPA_PortRangeHintDescriptor prhd = + descriptor->LADSPA_Plugin->PortRangeHints[j].HintDescriptor; + const char * pname = descriptor->LADSPA_Plugin->PortNames[j]; + LADSPA_Data lb = descriptor->LADSPA_Plugin-> + PortRangeHints[j].LowerBound; + LADSPA_Data ub = descriptor->LADSPA_Plugin-> + PortRangeHints[j].UpperBound; + LADSPA_Data val = pluginControlIns[controlIn]; + LADSPA_Data def = get_port_default(descriptor->LADSPA_Plugin, j); + + if ((LADSPA_IS_HINT_BOUNDED_BELOW(prhd) && val < lb) || + (LADSPA_IS_HINT_BOUNDED_ABOVE(prhd) && val > ub)) { + fprintf(stderr, + "%s: Warning: port %d (%s) was %.3f, overriding to %.3f\n", + my_name, j, pname, val, def); + pluginControlIns[controlIn] = def; + } + if (DEBUG) { + fprintf(stderr, + "port %3d; prhd %3d; lb %6.2f; ub %6.2f; val %6.2f (%s)\n", + j, prhd, lb, ub, val, pname); + } + controlIn++; + } + } + + /* Activate */ + + if (descriptor->LADSPA_Plugin->activate) { + descriptor->LADSPA_Plugin->activate(instanceHandle); + } + + + /* Configure */ + + if (projectDirectory && descriptor->configure) { + char *rv = descriptor->configure(instanceHandle, + DSSI_PROJECT_DIRECTORY_KEY, + projectDirectory); + if (rv) { + fprintf(stderr, + "%s: Warning: plugin doesn't like project directory: \"%s\"\n", + my_name, rv); + } + } + if (nkeys && descriptor->configure) { + for (int i = 0; i < nkeys; i++) { + char *rv = descriptor->configure(instanceHandle, + configure_key[i], + configure_val[i]); + if (rv) { + fprintf(stderr, + "%s: Warning: plugin doesn't like " + "configure key-value pair: \"%s\"\n", + my_name, rv); + } + } + } + + + /* Open sndfile */ + + outsfinfo.samplerate = sample_rate; + outsfinfo.channels = nchannels; + outsfinfo.format = SF_FORMAT_WAV | SF_FORMAT_PCM_16; + outsfinfo.frames = length; + + outfile = sf_open(output_file, SFM_WRITE, &outsfinfo); + if (!outfile) { + fprintf(stderr, "%s: Error: Not able to open output file %s.\n", + my_name, output_file); + fprintf(stderr, "%s: %s\n", my_name, sf_strerror(outfile)); + return 1; + } + + + /* Instead of creating an alsa midi input, we fill in two events + * note-on and note-off */ + + snd_seq_event_t on_event, off_event, *current_event; + on_event.type = SND_SEQ_EVENT_NOTEON; + on_event.data.note.channel = 0; + on_event.data.note.note = midi_note; + on_event.data.note.velocity = midi_velocity; + on_event.time.tick = 0; + + off_event.type = SND_SEQ_EVENT_NOTEOFF; + off_event.data.note.channel = 0; + off_event.data.note.note = midi_note; + off_event.data.note.off_velocity = midi_velocity; + off_event.time.tick = 0; + + /* Generate the data: send an on-event, wait, send an off-event, + wait for release tail to die */ + total_written = 0; + int finished = 0; + unsigned long nevents; + while (!finished) { + if (total_written == 0) { + current_event = &on_event; + nevents = 1; + } else if (total_written >= length && total_written < length + nframes) { + current_event = &off_event; + nevents = 1; + } else { + current_event = NULL; + nevents = 0; + } + +/* if (DEBUG) { */ +/* fprintf(stderr, "about to call run_synth() or run_multiple_synths() with %ld events\n", nevents); */ +/* } */ + + if (descriptor->run_synth) { + descriptor->run_synth(instanceHandle, + nframes, + current_event, + nevents); + } else if (descriptor->run_multiple_synths) { + descriptor->run_multiple_synths(1, + &instanceHandle, + nframes, + ¤t_event, + &nevents); + } + + /* Interleaving for libsndfile. */ + float sf_output[nchannels * nframes]; + for (int i = 0; i < nframes; i++) { + /* First, write all the obvious channels */ + for (int j = 0; j < min(outs, nchannels); j++) { + /* If outs > nchannels, we *could* do mixing - but don't. */ + sf_output[i * nchannels + j] = pluginOutputBuffers[j][i]; + } + /* Then, if user wants *more* output channels than there are + * audio output ports (ie outs < nchannels), copy the last audio + * out to all the remaining channels. If outs >= nchannels, this + * loop is never entered. */ + for (int j = outs; j < nchannels; j++) { + sf_output[i * nchannels + j] = pluginOutputBuffers[outs - 1][i]; + } + } + + if (clip) { + for (int i = 0; i < nframes * nchannels; i++) { + if (!finite(sf_output[i])) { + if (!have_warned) { + have_warned = 1; + fprintf(stderr, + "%s: Warning: clipping NaN or Inf in synthesized data\n", + my_name); + } + if (sf_output[i] < 0.0f) { + sf_output[i] = -1.0f; + } else { + sf_output[i] = 1.0f; + } + } else { + if (sf_output[i] < -1.0f) { + if (!have_warned) { + have_warned = 1; + fprintf(stderr, + "%s: Warning: clipping out-of-bounds value in synthesized data\n", + my_name); + } + sf_output[i] = -1.0f; + } else if (sf_output[i] > 1.0f) { + if (!have_warned) { + have_warned = 1; + fprintf(stderr, + "%s: Warning: clipping out-of-bounds value in synthesized data\n", + my_name); + } + sf_output[i] = 1.0f; + } + } + } + } else { + for (int i = 0; i < nframes * nchannels; i++) { + if (!finite(sf_output[i])) { + fprintf(stderr, "%s: Error: NaN or Inf in synthesized data\n", + my_name); + exit(1); + } + if (sf_output[i] > 1.0f + || sf_output[i] < -1.0f) { + fprintf(stderr, "%s: Error: sample data out of bounds\n", + my_name); + exit(1); + } + } + } + + /* Write the audio */ + if ((items_written = sf_writef_float(outfile, + sf_output, + nframes)) != nframes) { + fprintf(stderr, "%s: Error: can't write data to output file %s\n", + my_name, output_file); + fprintf(stderr, "%s: %s\n", my_name, sf_strerror(outfile)); + return 1; + } + + total_written += items_written; + if (release_tail >= 0) { + if (total_written > length + release_tail) { + finished = 1; + } + } else { + if (total_written > length + && is_silent(sf_output, nframes * nchannels)) { + finished = 1; + } else if (total_written > MAX_LENGTH * sample_rate) { + /* The default sineshaper patch never releases, after a note-off, + * to silence. So truncate. This is sineshaper 0.3.0 (so maybe it's + * different in the new version) and here I mean the default + * patch as returned by the get_port_default() function, not the + * default set by the sineshaper UI. + */ + finished = 1; + fprintf(stderr, "%s: Warning: truncating after writing %d frames\n", + my_name, total_written); + } + } + } + + fprintf(stdout, "%s: Wrote %d frames to %s\n", + my_name, total_written, output_file); + + sf_close(outfile); + + /* Clean up */ + + if (descriptor->LADSPA_Plugin->deactivate) { + descriptor->LADSPA_Plugin->deactivate(instanceHandle); + } + + if (descriptor->LADSPA_Plugin->cleanup) { + descriptor->LADSPA_Plugin->cleanup(instanceHandle); + } + + return 0; +} + diff --git a/src/cli-dssi-host.h b/src/cli-dssi-host.h new file mode 100644 index 0000000..76c9425 --- /dev/null +++ b/src/cli-dssi-host.h @@ -0,0 +1,291 @@ +/* cli-dssi-host.h + * Copyright (C) 2005 James McDermott + * jamesmichaelmcdermott@gmail.com + * + * This program is derived from jack-dssi-host + * (Copyright 2004 Chris Cannam, Steve Harris and Sean Bolton). + * + * 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., 59 Temple Place, Suite 330, Boston, MA 01222-1307 + * USA + */ + +#ifndef _CLI_DSSI_HOST_H +#define _CLI_DSSI_HOST_H + +#define _BSD_SOURCE 1 +#define _SVID_SOURCE 1 +#define _ISOC99_SOURCE 1 + + +#define DEBUG 0 +#define MAX_LENGTH (15.0f) +#define SAMPLE_RATE 44100 +/* character used to separate SO names from plugin labels on command line */ +#define LABEL_SEP ':' +#define KEYVAL_SEP '=' +#define BANK_SEP ':' + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +#include <sndfile.h> +#include <ladspa.h> +#include <dssi.h> +//#include <alsa/asoundlib.h> these two, conflicts with sndfile.h, so if i comment out then souce compiles on my gentoo. is sndfile part of alsa? +//#include <alsa/seq.h> i guess not. what i found it there is asoundlib.h which include a lot of files from alsa, like alsa/seq.h and others, and +//looks like we don't need to include it here, it's included from somewhere else too. ok no worries +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <assert.h> +#include <dlfcn.h> +#include <unistd.h> +#include <math.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <sys/time.h> +#include <sys/wait.h> +#include <dirent.h> +#include <time.h> +#include <libgen.h> + + +static float sample_rate; +static int verbose = 0; +char *my_name; + +LADSPA_Data get_port_random(const LADSPA_Descriptor *plugin, int port) +{ + LADSPA_PortRangeHint hint = plugin->PortRangeHints[port]; + float lower = hint.LowerBound * + (LADSPA_IS_HINT_SAMPLE_RATE(hint.HintDescriptor) ? sample_rate : 1.0f); + float upper = hint.UpperBound * + (LADSPA_IS_HINT_SAMPLE_RATE(hint.HintDescriptor) ? sample_rate : 1.0f); + + /* FIXME: here we assume that ports are bounded, and we do not take the + * logarithmic hint into account. */ + + float x = random() / (float) RAND_MAX; + + return lower + x * (upper - lower); +} + +LADSPA_Data get_port_default(const LADSPA_Descriptor *plugin, int port) +{ + LADSPA_PortRangeHint hint = plugin->PortRangeHints[port]; + float lower = hint.LowerBound * + (LADSPA_IS_HINT_SAMPLE_RATE(hint.HintDescriptor) ? sample_rate : 1.0f); + float upper = hint.UpperBound * + (LADSPA_IS_HINT_SAMPLE_RATE(hint.HintDescriptor) ? sample_rate : 1.0f); + + if (!LADSPA_IS_HINT_HAS_DEFAULT(hint.HintDescriptor)) { + if (!LADSPA_IS_HINT_BOUNDED_BELOW(hint.HintDescriptor) || + !LADSPA_IS_HINT_BOUNDED_ABOVE(hint.HintDescriptor)) { + /* No hint, its not bounded, wild guess */ + return 0.0f; + } + + if (lower <= 0.0f && upper >= 0.0f) { + /* It spans 0.0, 0.0 is often a good guess */ + return 0.0f; + } + + /* No clues, return minimum */ + return lower; + } + + /* Try all the easy ones */ + + if (LADSPA_IS_HINT_DEFAULT_0(hint.HintDescriptor)) { + return 0.0f; + } else if (LADSPA_IS_HINT_DEFAULT_1(hint.HintDescriptor)) { + return 1.0f; + } else if (LADSPA_IS_HINT_DEFAULT_100(hint.HintDescriptor)) { + return 100.0f; + } else if (LADSPA_IS_HINT_DEFAULT_440(hint.HintDescriptor)) { + return 440.0f; + } + + /* All the others require some bounds */ + + if (LADSPA_IS_HINT_BOUNDED_BELOW(hint.HintDescriptor)) { + if (LADSPA_IS_HINT_DEFAULT_MINIMUM(hint.HintDescriptor)) { + return lower; + } + } + if (LADSPA_IS_HINT_BOUNDED_ABOVE(hint.HintDescriptor)) { + if (LADSPA_IS_HINT_DEFAULT_MAXIMUM(hint.HintDescriptor)) { + return upper; + } + if (LADSPA_IS_HINT_BOUNDED_BELOW(hint.HintDescriptor)) { + if (LADSPA_IS_HINT_LOGARITHMIC(hint.HintDescriptor) && + lower > 0.0f && upper > 0.0f) { + if (LADSPA_IS_HINT_DEFAULT_LOW(hint.HintDescriptor)) { + return expf(logf(lower) * 0.75f + logf(upper) * 0.25f); + } else if (LADSPA_IS_HINT_DEFAULT_MIDDLE(hint.HintDescriptor)) { + return expf(logf(lower) * 0.5f + logf(upper) * 0.5f); + } else if (LADSPA_IS_HINT_DEFAULT_HIGH(hint.HintDescriptor)) { + return expf(logf(lower) * 0.25f + logf(upper) * 0.75f); + } + } else { + if (LADSPA_IS_HINT_DEFAULT_LOW(hint.HintDescriptor)) { + return lower * 0.75f + upper * 0.25f; + } else if (LADSPA_IS_HINT_DEFAULT_MIDDLE(hint.HintDescriptor)) { + return lower * 0.5f + upper * 0.5f; + } else if (LADSPA_IS_HINT_DEFAULT_HIGH(hint.HintDescriptor)) { + return lower * 0.25f + upper * 0.75f; + } + } + } + } + + /* fallback */ + return 0.0f; +} + + + + +char * +load(const char *dllName, void **dll, int quiet) /* returns directory where dll found */ +{ + static char *defaultDssiPath = 0; + const char *dssiPath = getenv("DSSI_PATH"); + char *path, *origPath, *element; + const char *message; + void *handle = 0; + + /* If the dllName is an absolute path */ + if (*dllName == '/') { + if ((handle = dlopen(dllName, RTLD_NOW))) { /* real-time programs should not use RTLD_LAZY */ + *dll = handle; + path = strdup(dllName); + return dirname(path); + } else { + if (!quiet) { + fprintf(stderr, "%s: Error: Cannot find DSSI or LADSPA plugin at '%s'\n", my_name, dllName); + } + return NULL; + } + } + + if (!dssiPath) { + if (!defaultDssiPath) { + const char *home = getenv("HOME"); + if (home) { + defaultDssiPath = malloc(strlen(home) + 60); + sprintf(defaultDssiPath, "/usr/local/lib/dssi:/usr/lib/dssi:%s/.dssi", home); + } else { + defaultDssiPath = strdup("/usr/local/lib/dssi:/usr/lib/dssi"); + } + } + dssiPath = defaultDssiPath; + if (!quiet) { + fprintf(stderr, "\n%s: Warning: DSSI path not set\n%s: Defaulting to \"%s\"\n\n", my_name, my_name, dssiPath); + } + } + + path = strdup(dssiPath); + origPath = path; + *dll = 0; + + while ((element = strtok(path, ":")) != 0) { + + char *filePath; + + path = 0; + + if (element[0] != '/') { + if (!quiet) { + fprintf(stderr, "%s: Warning: Ignoring relative element \"%s\" in path\n", my_name, element); + } + continue; + } + + if (!quiet && verbose) { + fprintf(stderr, "%s: Looking for library \"%s\" in %s... ", my_name, dllName, element); + } + + filePath = (char *)malloc(strlen(element) + strlen(dllName) + 2); + sprintf(filePath, "%s/%s", element, dllName); + + if ((handle = dlopen(filePath, RTLD_NOW))) { /* real-time programs should not use RTLD_LAZY */ + if (!quiet && verbose) { + fprintf(stderr, "found\n"); + } + *dll = handle; + free(filePath); + path = strdup(element); + free(origPath); + return path; + } + + if (!quiet && verbose) { + message = dlerror(); + if (message) { + fprintf(stderr, "not found: %s\n", message); + } else { + fprintf(stderr, "not found\n"); + } + } + + free(filePath); + } + + free(origPath); + return 0; +} + +int +is_silent(LADSPA_Data *data, size_t length) { + float epsilon = 0.01f; + float sum = 0.0f; + + for (size_t i = 0; i < length; i++) { + sum += fabs(data[i]); + } + return (sum < epsilon); +} + +inline int +min(int x, int y) { + return (x < y) ? x : y; +} + + +void +parse_keyval(char *input, char sep, char **key, char **val) { + + char *tmp = strchr(input, sep); + if (tmp) { + *key = calloc(1, tmp - input + 1); + strncpy(*key, input, tmp - input); + *val = strdup(tmp + 1); + } else { + *key = strdup(input); + *val = NULL; + } +} + +typedef enum { + from_stdin, + from_defaults, + from_preset, + from_random +} port_vals_source_t; + +#endif /* _CLI_DSSI_HOST_H */ + diff --git a/src/cli-dssi-host.o b/src/cli-dssi-host.o Binary files differnew file mode 100644 index 0000000..3a806be --- /dev/null +++ b/src/cli-dssi-host.o diff --git a/src/lts.prs b/src/lts.prs new file mode 100644 index 0000000..b22fb23 --- /dev/null +++ b/src/lts.prs @@ -0,0 +1 @@ +440.0 0.1 0.3 0.3 0.3 0.9 |
