Removed the Debian directory.
Renamed directory "dev" to "dev_tools". Replaced the ecasound-2.7.2 with a new download of ecasound. The reason is that the previous ecasound directory had all the Makefiles checked in with hardcoded paths from Naomi's computer. This prevented anyone else from being able to build. I copied over the modified version of ecacontrol.py.
This commit is contained in:
parent
bfbca3f724
commit
6a39e4f5f5
463 changed files with 0 additions and 49380 deletions
24
library/ecasound/pyecasound/ChangeLog
Normal file
24
library/ecasound/pyecasound/ChangeLog
Normal file
|
@ -0,0 +1,24 @@
|
|||
2003-03-18 Kai Vehmanen <kaiv@.devtag.AUTHORS>
|
||||
|
||||
* ecacontrol.py: support for ECASOUND environment variable
|
||||
|
||||
2003-03-11 Janne Halttunen <jhalttun@.devtag.AUTHORS>
|
||||
|
||||
* python module name change from ecanative to ecacontrol
|
||||
* support for multiple functional instances of ECI class
|
||||
* disabled curses output from ecasound engine
|
||||
* added check for ecasound version number
|
||||
|
||||
2003-02-22 Janne Halttunen <jhalttun@.devtag.AUTHORS>
|
||||
|
||||
* native python ECI implementation
|
||||
|
||||
2001-04-27 Kai Vehmanen <kaiv@.devtag.AUTHORS>
|
||||
|
||||
* library version 0:0:0 frozen
|
||||
|
||||
2000-12-06 Kai Vehmanen <kaiv@.devtag.AUTHORS>
|
||||
|
||||
* development started; libtool version number 0:0:0
|
||||
|
||||
-----------------------------------------------------------------------
|
93
library/ecasound/pyecasound/Makefile.am
Normal file
93
library/ecasound/pyecasound/Makefile.am
Normal file
|
@ -0,0 +1,93 @@
|
|||
# ----------------------------------------------------------------------
|
||||
# File: ecasound/pyecasound/Makefile.am
|
||||
# Description: Python implmentation of the Ecasound Control Interface
|
||||
# License: LGPL (see ecasound/{AUTHORS,COPYING})
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
AUTOMAKE_OPTIONS = foreign
|
||||
EXTRA_DIST = eci.py pyeca.py ecacontrol.py \
|
||||
test1_stresstest.py \
|
||||
test2_stresstest.py
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# defines
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
if ECA_AM_DEBUG_MODE
|
||||
ecasoundc_libs = ${top_builddir}/libecasoundc/libecasoundc_debug.la
|
||||
else
|
||||
ecasoundc_libs = ${top_builddir}/libecasoundc/libecasoundc.la
|
||||
endif
|
||||
|
||||
if ECA_AM_PYECASOUND_INSTALL
|
||||
pyecasound_install_list1 = $(srcdir)/eci.py \
|
||||
$(srcdir)/pyeca.py \
|
||||
$(srcdir)/ecacontrol.py
|
||||
pyecasound_uninstall_list1 = $(DESTDIR)$(ECA_S_PYTHON_DLMODULES)/eci.py \
|
||||
$(DESTDIR)$(ECA_S_PYTHON_DLMODULES)/pyeca.py \
|
||||
$(DESTDIR)$(ECA_S_PYTHON_DLMODULES)/ecacontrol.py
|
||||
endif
|
||||
if ECA_AM_PYECASOUND_CEXT
|
||||
pyecasound_install_list2 = pyecasound.so
|
||||
pyecasound_uninstall_list2 = $(DESTDIR)$(ECA_S_PYTHON_DLMODULES)/pyecasound.so
|
||||
endif
|
||||
|
||||
INCLUDES = -I$(srcdir) \
|
||||
-I$(top_srcdir)/libecasoundc \
|
||||
-I$(ECA_S_PYTHON_INCLUDES)
|
||||
|
||||
if ECA_AM_PYECASOUND_INSTALL
|
||||
TESTS = test1_stresstest.py \
|
||||
test2_stresstest.py
|
||||
endif
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# header files
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
pyecasound_includes = pyecasound.h
|
||||
noinst_HEADERS = $(pyecasound_includes)
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# source files
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
if ECA_AM_PYECASOUND_CEXT
|
||||
noinst_LTLIBRARIES = libpyecasound.la
|
||||
endif
|
||||
|
||||
libpyecasound_la_SOURCES = pyecasound.c
|
||||
|
||||
# libtool options to build for dlopen
|
||||
libpyecasound_la_LDFLAGS = -avoid-version -export-dynamic
|
||||
|
||||
if ECA_AM_PYECASOUND_CEXT
|
||||
all: pyecasound.so
|
||||
|
||||
pyecasound.so: pyecasound.lo
|
||||
$(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) ${libpyecasound_la_LDFLAGS} -shared -nostartfiles -o pyecasound.so pyecasound.lo $(ecasoundc_libs)
|
||||
endif
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# hooks
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
if ECA_AM_PYECASOUND_CEXT
|
||||
CLEANFILES=pyecasound.so
|
||||
endif
|
||||
|
||||
if ECA_AM_PYECASOUND_INSTALL
|
||||
install-exec-hook: $(pyecasound_install_list1) $(pyecasound_install_list2)
|
||||
$(INSTALL) -d $(DESTDIR)$(ECA_S_PYTHON_DLMODULES)
|
||||
$(INSTALL) $(pyecasound_install_list1) $(pyecasound_install_list2) $(DESTDIR)$(ECA_S_PYTHON_DLMODULES)
|
||||
else
|
||||
install-exec-hook:
|
||||
endif
|
||||
|
||||
if ECA_AM_PYECASOUND_INSTALL
|
||||
uninstall-local:
|
||||
rm -f $(pyecasound_uninstall_list1) $(pyecasound_uninstall_list2)
|
||||
rmdir $(DESTDIR)$(ECA_S_PYTHON_DLMODULES) || echo "Skipping non-empty directory"
|
||||
else
|
||||
uninstall-local:
|
||||
endif
|
640
library/ecasound/pyecasound/Makefile.in
Normal file
640
library/ecasound/pyecasound/Makefile.in
Normal file
|
@ -0,0 +1,640 @@
|
|||
# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005 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@
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# File: ecasound/pyecasound/Makefile.am
|
||||
# Description: Python implmentation of the Ecasound Control Interface
|
||||
# License: LGPL (see ecasound/{AUTHORS,COPYING})
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
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 = pyecasound
|
||||
DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in ChangeLog TODO
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
LTLIBRARIES = $(noinst_LTLIBRARIES)
|
||||
libpyecasound_la_LIBADD =
|
||||
am_libpyecasound_la_OBJECTS = pyecasound.lo
|
||||
libpyecasound_la_OBJECTS = $(am_libpyecasound_la_OBJECTS)
|
||||
@ECA_AM_PYECASOUND_CEXT_TRUE@am_libpyecasound_la_rpath =
|
||||
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = $(libpyecasound_la_SOURCES)
|
||||
DIST_SOURCES = $(libpyecasound_la_SOURCES)
|
||||
HEADERS = $(noinst_HEADERS)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AM_CFLAGS = @AM_CFLAGS@
|
||||
AM_CPPFLAGS = @AM_CPPFLAGS@
|
||||
AM_CXXFLAGS = @AM_CXXFLAGS@
|
||||
AM_LDFLAGS = @AM_LDFLAGS@
|
||||
AR = @AR@
|
||||
ARTSC_CONFIG = @ARTSC_CONFIG@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
ECA_AM_ALL_STATIC_FALSE = @ECA_AM_ALL_STATIC_FALSE@
|
||||
ECA_AM_ALL_STATIC_TRUE = @ECA_AM_ALL_STATIC_TRUE@
|
||||
ECA_AM_COMPILE_ALSA_FALSE = @ECA_AM_COMPILE_ALSA_FALSE@
|
||||
ECA_AM_COMPILE_ALSA_TRUE = @ECA_AM_COMPILE_ALSA_TRUE@
|
||||
ECA_AM_COMPILE_ARTS_FALSE = @ECA_AM_COMPILE_ARTS_FALSE@
|
||||
ECA_AM_COMPILE_ARTS_TRUE = @ECA_AM_COMPILE_ARTS_TRUE@
|
||||
ECA_AM_COMPILE_AUDIOFILE_FALSE = @ECA_AM_COMPILE_AUDIOFILE_FALSE@
|
||||
ECA_AM_COMPILE_AUDIOFILE_TRUE = @ECA_AM_COMPILE_AUDIOFILE_TRUE@
|
||||
ECA_AM_COMPILE_JACK_FALSE = @ECA_AM_COMPILE_JACK_FALSE@
|
||||
ECA_AM_COMPILE_JACK_TRUE = @ECA_AM_COMPILE_JACK_TRUE@
|
||||
ECA_AM_COMPILE_OSS_FALSE = @ECA_AM_COMPILE_OSS_FALSE@
|
||||
ECA_AM_COMPILE_OSS_TRUE = @ECA_AM_COMPILE_OSS_TRUE@
|
||||
ECA_AM_COMPILE_SAMPLERATE_FALSE = @ECA_AM_COMPILE_SAMPLERATE_FALSE@
|
||||
ECA_AM_COMPILE_SAMPLERATE_TRUE = @ECA_AM_COMPILE_SAMPLERATE_TRUE@
|
||||
ECA_AM_COMPILE_SNDFILE_FALSE = @ECA_AM_COMPILE_SNDFILE_FALSE@
|
||||
ECA_AM_COMPILE_SNDFILE_TRUE = @ECA_AM_COMPILE_SNDFILE_TRUE@
|
||||
ECA_AM_DEBUG_MODE_FALSE = @ECA_AM_DEBUG_MODE_FALSE@
|
||||
ECA_AM_DEBUG_MODE_TRUE = @ECA_AM_DEBUG_MODE_TRUE@
|
||||
ECA_AM_DISABLE_EFFECTS_FALSE = @ECA_AM_DISABLE_EFFECTS_FALSE@
|
||||
ECA_AM_DISABLE_EFFECTS_TRUE = @ECA_AM_DISABLE_EFFECTS_TRUE@
|
||||
ECA_AM_FEELING_EXPERIMENTAL_FALSE = @ECA_AM_FEELING_EXPERIMENTAL_FALSE@
|
||||
ECA_AM_FEELING_EXPERIMENTAL_TRUE = @ECA_AM_FEELING_EXPERIMENTAL_TRUE@
|
||||
ECA_AM_KVUTILS_INSTALLED_FALSE = @ECA_AM_KVUTILS_INSTALLED_FALSE@
|
||||
ECA_AM_KVUTILS_INSTALLED_TRUE = @ECA_AM_KVUTILS_INSTALLED_TRUE@
|
||||
ECA_AM_PYECASOUND_CEXT_FALSE = @ECA_AM_PYECASOUND_CEXT_FALSE@
|
||||
ECA_AM_PYECASOUND_CEXT_TRUE = @ECA_AM_PYECASOUND_CEXT_TRUE@
|
||||
ECA_AM_PYECASOUND_INSTALL_FALSE = @ECA_AM_PYECASOUND_INSTALL_FALSE@
|
||||
ECA_AM_PYECASOUND_INSTALL_TRUE = @ECA_AM_PYECASOUND_INSTALL_TRUE@
|
||||
ECA_AM_RUBYECASOUND_INSTALL_FALSE = @ECA_AM_RUBYECASOUND_INSTALL_FALSE@
|
||||
ECA_AM_RUBYECASOUND_INSTALL_TRUE = @ECA_AM_RUBYECASOUND_INSTALL_TRUE@
|
||||
ECA_AM_SYSTEM_READLINE_FALSE = @ECA_AM_SYSTEM_READLINE_FALSE@
|
||||
ECA_AM_SYSTEM_READLINE_TRUE = @ECA_AM_SYSTEM_READLINE_TRUE@
|
||||
ECA_AM_USE_NCURSES_FALSE = @ECA_AM_USE_NCURSES_FALSE@
|
||||
ECA_AM_USE_NCURSES_TRUE = @ECA_AM_USE_NCURSES_TRUE@
|
||||
ECA_AM_USE_TERMCAP_FALSE = @ECA_AM_USE_TERMCAP_FALSE@
|
||||
ECA_AM_USE_TERMCAP_TRUE = @ECA_AM_USE_TERMCAP_TRUE@
|
||||
ECA_S_EXTRA_CPPFLAGS = @ECA_S_EXTRA_CPPFLAGS@
|
||||
ECA_S_EXTRA_LIBS = @ECA_S_EXTRA_LIBS@
|
||||
ECA_S_JACK_INCLUDES = @ECA_S_JACK_INCLUDES@
|
||||
ECA_S_JACK_LIBS = @ECA_S_JACK_LIBS@
|
||||
ECA_S_PREFIX = @ECA_S_PREFIX@
|
||||
ECA_S_PYTHON_DLMODULES = @ECA_S_PYTHON_DLMODULES@
|
||||
ECA_S_PYTHON_INCLUDES = @ECA_S_PYTHON_INCLUDES@
|
||||
ECA_S_PYTHON_MODULES = @ECA_S_PYTHON_MODULES@
|
||||
ECA_S_READLINE_INCLUDES = @ECA_S_READLINE_INCLUDES@
|
||||
ECA_S_READLINE_LIBS = @ECA_S_READLINE_LIBS@
|
||||
ECA_S_RUBY_SITEDIR = @ECA_S_RUBY_SITEDIR@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
GREP = @GREP@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBECASOUNDC_VERSION = @LIBECASOUNDC_VERSION@
|
||||
LIBECASOUNDC_VERSION_AGE = @LIBECASOUNDC_VERSION_AGE@
|
||||
LIBECASOUND_VERSION = @LIBECASOUND_VERSION@
|
||||
LIBECASOUND_VERSION_AGE = @LIBECASOUND_VERSION_AGE@
|
||||
LIBKVUTILS_VERSION = @LIBKVUTILS_VERSION@
|
||||
LIBKVUTILS_VERSION_AGE = @LIBKVUTILS_VERSION_AGE@
|
||||
LIBLO_CFLAGS = @LIBLO_CFLAGS@
|
||||
LIBLO_LIBS = @LIBLO_LIBS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBOIL_CFLAGS = @LIBOIL_CFLAGS@
|
||||
LIBOIL_LIBS = @LIBOIL_LIBS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
PYTHONPATH = @PYTHONPATH@
|
||||
RANLIB = @RANLIB@
|
||||
RUBYPATH = @RUBYPATH@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
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@
|
||||
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@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
AUTOMAKE_OPTIONS = foreign
|
||||
EXTRA_DIST = eci.py pyeca.py ecacontrol.py \
|
||||
test1_stresstest.py \
|
||||
test2_stresstest.py
|
||||
|
||||
@ECA_AM_DEBUG_MODE_FALSE@ecasoundc_libs = ${top_builddir}/libecasoundc/libecasoundc.la
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# defines
|
||||
# ----------------------------------------------------------------------
|
||||
@ECA_AM_DEBUG_MODE_TRUE@ecasoundc_libs = ${top_builddir}/libecasoundc/libecasoundc_debug.la
|
||||
@ECA_AM_PYECASOUND_INSTALL_TRUE@pyecasound_install_list1 = $(srcdir)/eci.py \
|
||||
@ECA_AM_PYECASOUND_INSTALL_TRUE@ $(srcdir)/pyeca.py \
|
||||
@ECA_AM_PYECASOUND_INSTALL_TRUE@ $(srcdir)/ecacontrol.py
|
||||
|
||||
@ECA_AM_PYECASOUND_INSTALL_TRUE@pyecasound_uninstall_list1 = $(DESTDIR)$(ECA_S_PYTHON_DLMODULES)/eci.py \
|
||||
@ECA_AM_PYECASOUND_INSTALL_TRUE@ $(DESTDIR)$(ECA_S_PYTHON_DLMODULES)/pyeca.py \
|
||||
@ECA_AM_PYECASOUND_INSTALL_TRUE@ $(DESTDIR)$(ECA_S_PYTHON_DLMODULES)/ecacontrol.py
|
||||
|
||||
@ECA_AM_PYECASOUND_CEXT_TRUE@pyecasound_install_list2 = pyecasound.so
|
||||
@ECA_AM_PYECASOUND_CEXT_TRUE@pyecasound_uninstall_list2 = $(DESTDIR)$(ECA_S_PYTHON_DLMODULES)/pyecasound.so
|
||||
INCLUDES = -I$(srcdir) \
|
||||
-I$(top_srcdir)/libecasoundc \
|
||||
-I$(ECA_S_PYTHON_INCLUDES)
|
||||
|
||||
@ECA_AM_PYECASOUND_INSTALL_TRUE@TESTS = test1_stresstest.py \
|
||||
@ECA_AM_PYECASOUND_INSTALL_TRUE@ test2_stresstest.py
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# header files
|
||||
# ----------------------------------------------------------------------
|
||||
pyecasound_includes = pyecasound.h
|
||||
noinst_HEADERS = $(pyecasound_includes)
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# source files
|
||||
# ----------------------------------------------------------------------
|
||||
@ECA_AM_PYECASOUND_CEXT_TRUE@noinst_LTLIBRARIES = libpyecasound.la
|
||||
libpyecasound_la_SOURCES = pyecasound.c
|
||||
|
||||
# libtool options to build for dlopen
|
||||
libpyecasound_la_LDFLAGS = -avoid-version -export-dynamic
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# hooks
|
||||
# ----------------------------------------------------------------------
|
||||
@ECA_AM_PYECASOUND_CEXT_TRUE@CLEANFILES = pyecasound.so
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .lo .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 \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign pyecasound/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign pyecasound/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
|
||||
|
||||
clean-noinstLTLIBRARIES:
|
||||
-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
|
||||
@list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
|
||||
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
|
||||
test "$$dir" != "$$p" || dir=.; \
|
||||
echo "rm -f \"$${dir}/so_locations\""; \
|
||||
rm -f "$${dir}/so_locations"; \
|
||||
done
|
||||
libpyecasound.la: $(libpyecasound_la_OBJECTS) $(libpyecasound_la_DEPENDENCIES)
|
||||
$(LINK) $(am_libpyecasound_la_rpath) $(libpyecasound_la_LDFLAGS) $(libpyecasound_la_OBJECTS) $(libpyecasound_la_LIBADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyecasound.Plo@am__quote@
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
check-TESTS: $(TESTS)
|
||||
@failed=0; all=0; xfail=0; xpass=0; skip=0; \
|
||||
srcdir=$(srcdir); export srcdir; \
|
||||
list='$(TESTS)'; \
|
||||
if test -n "$$list"; then \
|
||||
for tst in $$list; do \
|
||||
if test -f ./$$tst; then dir=./; \
|
||||
elif test -f $$tst; then dir=; \
|
||||
else dir="$(srcdir)/"; fi; \
|
||||
if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
|
||||
all=`expr $$all + 1`; \
|
||||
case " $(XFAIL_TESTS) " in \
|
||||
*" $$tst "*) \
|
||||
xpass=`expr $$xpass + 1`; \
|
||||
failed=`expr $$failed + 1`; \
|
||||
echo "XPASS: $$tst"; \
|
||||
;; \
|
||||
*) \
|
||||
echo "PASS: $$tst"; \
|
||||
;; \
|
||||
esac; \
|
||||
elif test $$? -ne 77; then \
|
||||
all=`expr $$all + 1`; \
|
||||
case " $(XFAIL_TESTS) " in \
|
||||
*" $$tst "*) \
|
||||
xfail=`expr $$xfail + 1`; \
|
||||
echo "XFAIL: $$tst"; \
|
||||
;; \
|
||||
*) \
|
||||
failed=`expr $$failed + 1`; \
|
||||
echo "FAIL: $$tst"; \
|
||||
;; \
|
||||
esac; \
|
||||
else \
|
||||
skip=`expr $$skip + 1`; \
|
||||
echo "SKIP: $$tst"; \
|
||||
fi; \
|
||||
done; \
|
||||
if test "$$failed" -eq 0; then \
|
||||
if test "$$xfail" -eq 0; then \
|
||||
banner="All $$all tests passed"; \
|
||||
else \
|
||||
banner="All $$all tests behaved as expected ($$xfail expected failures)"; \
|
||||
fi; \
|
||||
else \
|
||||
if test "$$xpass" -eq 0; then \
|
||||
banner="$$failed of $$all tests failed"; \
|
||||
else \
|
||||
banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \
|
||||
fi; \
|
||||
fi; \
|
||||
dashes="$$banner"; \
|
||||
skipped=""; \
|
||||
if test "$$skip" -ne 0; then \
|
||||
skipped="($$skip tests were not run)"; \
|
||||
test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
|
||||
dashes="$$skipped"; \
|
||||
fi; \
|
||||
report=""; \
|
||||
if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
|
||||
report="Please report to $(PACKAGE_BUGREPORT)"; \
|
||||
test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
|
||||
dashes="$$report"; \
|
||||
fi; \
|
||||
dashes=`echo "$$dashes" | sed s/./=/g`; \
|
||||
echo "$$dashes"; \
|
||||
echo "$$banner"; \
|
||||
test -z "$$skipped" || echo "$$skipped"; \
|
||||
test -z "$$report" || echo "$$report"; \
|
||||
echo "$$dashes"; \
|
||||
test "$$failed" -eq 0; \
|
||||
else :; fi
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$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
|
||||
$(MAKE) $(AM_MAKEFLAGS) check-TESTS
|
||||
check: check-am
|
||||
all-am: Makefile $(LTLIBRARIES) $(HEADERS)
|
||||
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:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_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-generic clean-libtool clean-noinstLTLIBRARIES \
|
||||
mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-libtool distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-exec-am:
|
||||
@$(NORMAL_INSTALL)
|
||||
$(MAKE) $(AM_MAKEFLAGS) install-exec-hook
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
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 \
|
||||
mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-info-am uninstall-local
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \
|
||||
clean-generic clean-libtool clean-noinstLTLIBRARIES ctags \
|
||||
distclean distclean-compile distclean-generic \
|
||||
distclean-libtool distclean-tags distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-data \
|
||||
install-data-am install-exec install-exec-am install-exec-hook \
|
||||
install-info install-info-am install-man install-strip \
|
||||
installcheck installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||
tags uninstall uninstall-am uninstall-info-am uninstall-local
|
||||
|
||||
|
||||
@ECA_AM_PYECASOUND_CEXT_TRUE@all: pyecasound.so
|
||||
|
||||
@ECA_AM_PYECASOUND_CEXT_TRUE@pyecasound.so: pyecasound.lo
|
||||
@ECA_AM_PYECASOUND_CEXT_TRUE@ $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) ${libpyecasound_la_LDFLAGS} -shared -nostartfiles -o pyecasound.so pyecasound.lo $(ecasoundc_libs)
|
||||
|
||||
@ECA_AM_PYECASOUND_INSTALL_TRUE@install-exec-hook: $(pyecasound_install_list1) $(pyecasound_install_list2)
|
||||
@ECA_AM_PYECASOUND_INSTALL_TRUE@ $(INSTALL) -d $(DESTDIR)$(ECA_S_PYTHON_DLMODULES)
|
||||
@ECA_AM_PYECASOUND_INSTALL_TRUE@ $(INSTALL) $(pyecasound_install_list1) $(pyecasound_install_list2) $(DESTDIR)$(ECA_S_PYTHON_DLMODULES)
|
||||
@ECA_AM_PYECASOUND_INSTALL_FALSE@install-exec-hook:
|
||||
|
||||
@ECA_AM_PYECASOUND_INSTALL_TRUE@uninstall-local:
|
||||
@ECA_AM_PYECASOUND_INSTALL_TRUE@ rm -f $(pyecasound_uninstall_list1) $(pyecasound_uninstall_list2)
|
||||
@ECA_AM_PYECASOUND_INSTALL_TRUE@ rmdir $(DESTDIR)$(ECA_S_PYTHON_DLMODULES) || echo "Skipping non-empty directory"
|
||||
@ECA_AM_PYECASOUND_INSTALL_FALSE@uninstall-local:
|
||||
# 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:
|
5
library/ecasound/pyecasound/TODO
Normal file
5
library/ecasound/pyecasound/TODO
Normal file
|
@ -0,0 +1,5 @@
|
|||
-------------------
|
||||
* pyecasound TODO *
|
||||
-------------------
|
||||
|
||||
- finish eiam-class, in which eiam commands are seen as python-methods
|
356
library/ecasound/pyecasound/ecacontrol.py
Executable file
356
library/ecasound/pyecasound/ecacontrol.py
Executable file
|
@ -0,0 +1,356 @@
|
|||
"""Native python ECI (ecasound control interface) implementation
|
||||
|
||||
Can be used to replace the C implementation 'pyecasound.so'.
|
||||
"""
|
||||
|
||||
# Version: $Id: ecacontrol.py,v 1.8 2003-11-26 19:33:55 kaiv Exp $
|
||||
|
||||
authors="""Kai Vehmanen, Eric S. Tiedemann and Janne Halttunen."""
|
||||
|
||||
import re
|
||||
from subprocess import *
|
||||
from select import select
|
||||
import os
|
||||
import signal
|
||||
import string
|
||||
import time
|
||||
|
||||
_ecasound=[]
|
||||
|
||||
type_override={}
|
||||
eci_str_sync_lost= 'Connection to the processing engine was lost.\n'
|
||||
|
||||
class ECA_CONTROL_INTERFACE:
|
||||
|
||||
def __init__(I, verbose=1):
|
||||
"""Instantiate new ECI session
|
||||
|
||||
verbose: set this false to get rid of startup-messages
|
||||
"""
|
||||
I.verbose=verbose
|
||||
|
||||
I._cmd=''
|
||||
I._type=''
|
||||
I._timeout=5 # in seconds
|
||||
I._resp={}
|
||||
I.initialize()
|
||||
|
||||
|
||||
def __call__(I, cmd, f=None):
|
||||
if f != None:
|
||||
val=I.command_float_arg(cmd, f)
|
||||
else:
|
||||
cmds=string.split(cmd, '\n')
|
||||
if len(cmds) > 1:
|
||||
v=[]
|
||||
for c in cmds:
|
||||
c=string.strip(c)
|
||||
if c:
|
||||
v.append(I.command(c))
|
||||
|
||||
if I.error():
|
||||
raise Exception(v[-1])
|
||||
|
||||
val=string.join(map(str, v), '\n')
|
||||
else:
|
||||
val=I.command(cmd)
|
||||
|
||||
if I.error():
|
||||
raise Exception(val)
|
||||
|
||||
return val
|
||||
|
||||
def _readline(I):
|
||||
return string.strip(I.eca.stdout.readline())
|
||||
|
||||
def _read_eca(I):
|
||||
buffer=''
|
||||
while select([I.eca.stdout.fileno()],[],[I.eca.stdout.fileno()],0.01)[0]:
|
||||
buffer=buffer+I.eca.stdout.read(1)
|
||||
return buffer
|
||||
|
||||
def _parse_response(I):
|
||||
tm=''; r=(); failcount=0
|
||||
if I.verbose > 2:
|
||||
print 'c=' + I._cmd
|
||||
while 1:
|
||||
|
||||
s=I._read_eca()
|
||||
#print 'read s=' + s
|
||||
if s:
|
||||
if I.verbose > 3:
|
||||
print 's=<', s, '>'
|
||||
else:
|
||||
failcount = failcount + 1
|
||||
if failcount < I._timeout * 10:
|
||||
#if failcount < 0:
|
||||
time.sleep(0.01)
|
||||
continue
|
||||
else:
|
||||
print 'timeout: s=<' + s, '>, cmd=' + I._cmd + '.'
|
||||
r=('e', eci_str_sync_lost)
|
||||
break
|
||||
tm=tm+s
|
||||
m=expand_eiam_response(tm)
|
||||
r=parse_eiam_response(tm, m)
|
||||
if r:
|
||||
if I.verbose > 2:
|
||||
print 'r=', r
|
||||
break
|
||||
|
||||
if not r:
|
||||
I._resp['e']='-'
|
||||
I._type='e'
|
||||
r=None
|
||||
else:
|
||||
I._type=r[0]
|
||||
|
||||
if I._cmd in type_override.keys():
|
||||
I._type=type_override[I._cmd]
|
||||
|
||||
if I._type == 'S':
|
||||
I._resp[I._type]=string.split(r[1], ',')
|
||||
elif I._type == 'Sn':
|
||||
I._resp[I._type]=string.split(r[1], '\n')
|
||||
elif I._type == 'f':
|
||||
I._resp[I._type]=float(r[1])
|
||||
elif I._type == 'i':
|
||||
I._resp[I._type]=int(r[1])
|
||||
elif I._type == 'li':
|
||||
I._resp[I._type]=long(r[1])
|
||||
else:
|
||||
I._resp[I._type]=r[1]
|
||||
|
||||
return I._resp[I._type]
|
||||
|
||||
|
||||
def initialize(I):
|
||||
"""Reserve resources"""
|
||||
|
||||
## if _ecasound is not None:
|
||||
## I.cleanup() # exit previous ecasound session cleanly
|
||||
|
||||
global _ecasound
|
||||
|
||||
try:
|
||||
ecasound_binary = os.environ['ECASOUND']
|
||||
except KeyError:
|
||||
ecasound_binary = ''
|
||||
|
||||
if ecasound_binary == '':
|
||||
ecasound_binary = 'ecasound'
|
||||
|
||||
_ecasound.append(Popen(ecasound_binary + ' -c -d:256 2>/dev/null', shell=True, bufsize=0, stdin=PIPE, stdout=PIPE, stderr=PIPE, close_fds=True))
|
||||
|
||||
I.eca=_ecasound[-1]
|
||||
|
||||
lines=''
|
||||
|
||||
lines=lines+I._readline()+'\n'
|
||||
|
||||
version=I._readline()
|
||||
|
||||
s=string.find(version, 'ecasound v')
|
||||
if float(version[s+10:s+13])>=2.2:
|
||||
lines=lines+version+'\n'
|
||||
else:
|
||||
raise RuntimeError('ecasound version 2.2 required!')
|
||||
|
||||
lines=lines+I._readline()+'\n'
|
||||
|
||||
if I.verbose:
|
||||
print lines
|
||||
print __doc__
|
||||
print 'by', authors
|
||||
print '\n(to get rid of this message, pass zero to instance init)'
|
||||
|
||||
I.command('int-output-mode-wellformed')
|
||||
#I._read_eca()
|
||||
#I.command('debug 256')
|
||||
|
||||
def cleanup(I):
|
||||
"""Free all reserved resources"""
|
||||
|
||||
I.eca.stdin.write('quit\n')
|
||||
|
||||
os.kill(I.eca.pid, signal.SIGTERM)
|
||||
|
||||
signal.signal(signal.SIGALRM, handler)
|
||||
signal.alarm(2)
|
||||
|
||||
try:
|
||||
return I.eca.wait()
|
||||
except:
|
||||
pass
|
||||
|
||||
signal.alarm(0)
|
||||
os.kill(I.eca.pid, signal.SIGKILL)
|
||||
|
||||
|
||||
def command(I,cmd):
|
||||
"""Issue an EIAM command"""
|
||||
|
||||
cmd=string.strip(cmd)
|
||||
if cmd:
|
||||
I._cmd=cmd
|
||||
I.eca.stdin.write(cmd+'\n')
|
||||
return I._parse_response()
|
||||
|
||||
def command_float_arg(I,cmd,f=None):
|
||||
"""Issue an EIAM command
|
||||
|
||||
This function can be used instead of command(string),
|
||||
if the command in question requires exactly one numerical parameter."""
|
||||
|
||||
cmd=string.strip(cmd)
|
||||
if cmd:
|
||||
I._cmd=cmd
|
||||
if f:
|
||||
I.eca.stdin.write('%s %f\n' % (cmd,f))
|
||||
else:
|
||||
I.eca.stdin.write(cmd+'\n')
|
||||
return I._parse_response()
|
||||
|
||||
def error(I):
|
||||
"""Return true if error has occured during the execution of last EIAM command"""
|
||||
|
||||
if I._type=='e': return 1
|
||||
|
||||
def last_error(I):
|
||||
"""Return a string describing the last error"""
|
||||
|
||||
if I.error():
|
||||
return I._resp.get('e')
|
||||
else:
|
||||
return ''
|
||||
|
||||
def last_float(I):
|
||||
"""Return the last floating-point return value"""
|
||||
return I._resp.get('f')
|
||||
|
||||
def last_integer(I):
|
||||
"""Return the last integer return value
|
||||
|
||||
This function is also used to return boolean values."""
|
||||
return I._resp.get('i')
|
||||
|
||||
def last_long_integer(I):
|
||||
"""Return the last long integer return value
|
||||
|
||||
Long integers are used to pass values like 'length_in_samples'
|
||||
and 'length_in_bytes'. It's implementation specific whether there's
|
||||
any real difference between integers and long integers."""
|
||||
return I._resp.get('li')
|
||||
|
||||
def last_string(I):
|
||||
"""Return the last string return value"""
|
||||
return I._resp.get('s')
|
||||
|
||||
def last_string_list(I):
|
||||
"""Return the last collection of strings (one or more strings)"""
|
||||
return I._resp.get('S')
|
||||
|
||||
def last_type(I):
|
||||
return I._type
|
||||
|
||||
def current_event(I):
|
||||
"""** not implemented **"""
|
||||
pass
|
||||
def events_available(I):
|
||||
"""** not implemented **"""
|
||||
pass
|
||||
def next_event(I):
|
||||
"""** not implemented **"""
|
||||
pass
|
||||
|
||||
|
||||
def handler(*args):
|
||||
print 'AARGH!'
|
||||
raise Exception, 'killing me not so softly'
|
||||
|
||||
|
||||
expand=re.compile('256 ([0-9]{1,5}) (.+)\r\n(.*)\r\n\r\n.*', re.MULTILINE | re.S)
|
||||
|
||||
def expand_eiam_response(st):
|
||||
"""Checks wheter 'str' is a valid EIAM response.
|
||||
|
||||
@return Regex match object.
|
||||
"""
|
||||
|
||||
m = expand.search(st)
|
||||
return m
|
||||
|
||||
parse=re.compile('256 ([0-9]{1,5}) (.+)\r\n(.*)', re.MULTILINE | re.S)
|
||||
|
||||
def parse_eiam_response(st, m=None):
|
||||
"""Parses a valid EIAM response.
|
||||
|
||||
@param m Valid regex match object.
|
||||
@param str The whole EIAM response.
|
||||
|
||||
@return tuple of return value type and value
|
||||
"""
|
||||
|
||||
if not m:
|
||||
m = parse.search(st)
|
||||
if not m:
|
||||
return ()
|
||||
|
||||
if m and len(m.groups()) == 0:
|
||||
#print "(pyeca) Matching groups failed: %s" % str(m.groups())
|
||||
return ('e','Matching groups failed')
|
||||
|
||||
if m and len(m.groups()) == 3:
|
||||
#print 'received=', len(m.group(3)), ', expected=', m.group(1)
|
||||
if int(m.group(1)) != len(m.group(3)):
|
||||
print '(pyeca) Response length error. Received ', len(m.group(3)), ', expected for ', m.group(1), '.'
|
||||
#print 'g=', m.group(3)
|
||||
return ('e', 'Response length error.')
|
||||
|
||||
if m:
|
||||
return (m.group(2), m.group(3))
|
||||
|
||||
return ('e','')
|
||||
|
||||
|
||||
class base:
|
||||
def __init__(I, eci, cmd):
|
||||
I.eci=eci
|
||||
I.cmd=string.replace(cmd, '_', '-')
|
||||
|
||||
def __call__(I):
|
||||
return I.eci(I.cmd)
|
||||
|
||||
class string_argument(base):
|
||||
def __call__(I, s):
|
||||
return I.eci('%s %s' % (I.cmd,s))
|
||||
|
||||
|
||||
class EIAM:
|
||||
def __init__(I, verbose=0):
|
||||
I._eci=ECA_CONTROL_INTERFACE(verbose)
|
||||
I._cmds=I._eci('int-cmd-list')
|
||||
|
||||
for c in I._cmds:
|
||||
c=string.replace(c, '-', '_')
|
||||
if string.count(c, 'add') \
|
||||
or string.count(c, 'select'):
|
||||
I.__dict__[c]=string_argument(I._eci,c)
|
||||
else:
|
||||
I.__dict__[c]=base(I._eci,c)
|
||||
|
||||
def main():
|
||||
e=ECA_CONTROL_INTERFACE()
|
||||
print e.command('c-add huppaa')
|
||||
print e.command('c-list')
|
||||
|
||||
print e("""
|
||||
|
||||
c-list
|
||||
c-status
|
||||
""")
|
||||
|
||||
print e.cleanup()
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
109
library/ecasound/pyecasound/eci.py
Normal file
109
library/ecasound/pyecasound/eci.py
Normal file
|
@ -0,0 +1,109 @@
|
|||
"""
|
||||
# eci.ECI -- A higher-level interface to pyeca.
|
||||
# Copyright 2001 Eric S. Tiedemann (est@hyperreal.org)
|
||||
# GPLed
|
||||
|
||||
some updates by Janne Halttunen
|
||||
"""
|
||||
|
||||
import pyeca as _pyeca
|
||||
import types as _types
|
||||
|
||||
class ECIError(Exception):
|
||||
def __init__(self, what):
|
||||
Exception.__init__(self, what)
|
||||
self.what = what
|
||||
|
||||
def __str__(self):
|
||||
return '<ECIException %s>' % self.what
|
||||
|
||||
class ECI:
|
||||
"""An ECI is and ECA Control Interface object.
|
||||
|
||||
It can be called with ECI command strings (and an optional
|
||||
float value) as arguments. A list or tuple of command
|
||||
strings is also accepted and commands can be separated
|
||||
by newlines within a single string.
|
||||
|
||||
The value of a command (or of the last command in a sequence)
|
||||
if returned as a value of the appropriate Python type
|
||||
(possibly None).
|
||||
|
||||
On errors, an ECIException is raised that has a `what'
|
||||
member with the exception message. These exceptions also
|
||||
stringify prettily.
|
||||
"""
|
||||
|
||||
def __init__(self, *args):
|
||||
self.e = apply(_pyeca.ECA_CONTROL_INTERFACE, args)
|
||||
|
||||
def __call__(self, cmd, f=None):
|
||||
if f != None:
|
||||
self.e.command_float_arg(cmd, f)
|
||||
else:
|
||||
if type(cmd) == _types.ListType or type(cmd) == _types.TupleType:
|
||||
v = None
|
||||
for c in cmd:
|
||||
v = self(c)
|
||||
return v
|
||||
else:
|
||||
cmds = cmd.split('\n')
|
||||
if len(cmds) > 1:
|
||||
v = None
|
||||
for c in cmds:
|
||||
v = self(c)
|
||||
return v
|
||||
else:
|
||||
self.e.command(cmd)
|
||||
|
||||
t = self.e.last_type()
|
||||
if not t or t == '-':
|
||||
return None
|
||||
elif t == 'S':
|
||||
return self.e.last_string_list()
|
||||
elif t == 's':
|
||||
return self.e.last_string()
|
||||
elif t == 'f':
|
||||
return self.e.last_float()
|
||||
elif t == 'i':
|
||||
return self.e.last_integer()
|
||||
elif t == 'li':
|
||||
return self.e.last_long_integer()
|
||||
elif t == 'e' or self.e.error():
|
||||
raise ECIError, '%s: %s' % (self.e.last_error(), cmd)
|
||||
else:
|
||||
raise ECIError, "unknown return type '%s'!" % t
|
||||
|
||||
if __name__ == '__main__':
|
||||
import time, sys
|
||||
|
||||
file = sys.argv[1]
|
||||
e = ECI()
|
||||
|
||||
# uncomment to raise an error :)
|
||||
#e('foo')
|
||||
|
||||
e("""
|
||||
cs-add play_chainsetup
|
||||
c-add 1st_chain
|
||||
ai-add %s
|
||||
ao-add /dev/dsp
|
||||
cop-add -efl:100
|
||||
cop-select 1
|
||||
copp-select 1
|
||||
cs-connect
|
||||
start"""
|
||||
% file)
|
||||
|
||||
cutoff_inc = 500.0
|
||||
|
||||
while 1:
|
||||
time.sleep(1)
|
||||
if e("engine-status") != "running" or e("get-position") > 15:
|
||||
break
|
||||
e("copp-set", cutoff_inc + e("copp-get"))
|
||||
|
||||
e("""stop
|
||||
cs-disconnect""")
|
||||
|
||||
print "Chain operator status: ", e("cop-status")
|
52
library/ecasound/pyecasound/pyeca.py
Normal file
52
library/ecasound/pyecasound/pyeca.py
Normal file
|
@ -0,0 +1,52 @@
|
|||
"""Wrapper module which loads pyecasound
|
||||
(python module for Ecasound Control Interface).
|
||||
|
||||
To use C version of pyecasound, you have to enable global share of symbols.
|
||||
|
||||
Quote from python docs:
|
||||
|
||||
--cut--
|
||||
|
||||
setdlopenflags(n)
|
||||
|
||||
Set the flags used by the interpreter for dlopen() calls,
|
||||
such as when the interpreter loads extension modules.
|
||||
Among other things, this will enable a lazy resolving of symbols
|
||||
when importing a module, if called as sys.setdlopenflags(0).
|
||||
To share symbols across extension modules, call as
|
||||
sys.setdlopenflags(dl.RTLD_NOW | dl.RTLD_GLOBAL).
|
||||
Symbolic names for the flag modules can be either found in the dl module,
|
||||
or in the DLFCN module. If DLFCN is not available,
|
||||
it can be generated from /usr/include/dlfcn.h using the h2py script.
|
||||
Availability: Unix. New in version 2.2.
|
||||
|
||||
--cut--
|
||||
|
||||
|
||||
Otherwise falling back to native python version (possibly slower float-handling).
|
||||
"""
|
||||
|
||||
import sys
|
||||
|
||||
if hasattr(sys, 'version_info'): # attribute available from python 2.0
|
||||
if sys.version_info[1] >=2:
|
||||
try:
|
||||
import dl
|
||||
sys.setdlopenflags(dl.RTLD_LAZY|dl.RTLD_GLOBAL)
|
||||
|
||||
from pyecasound import *
|
||||
except:
|
||||
pass
|
||||
|
||||
try:
|
||||
import DLFCN
|
||||
sys.setdlopenflags(DLFCN.RTLD_LAZY|DLFCN.RTLD_GLOBAL)
|
||||
|
||||
from pyecasound import *
|
||||
except:
|
||||
from ecacontrol import *
|
||||
else:
|
||||
from ecacontrol import *
|
||||
else:
|
||||
from ecacontrol import *
|
||||
|
211
library/ecasound/pyecasound/pyecasound.c
Normal file
211
library/ecasound/pyecasound/pyecasound.c
Normal file
|
@ -0,0 +1,211 @@
|
|||
/**
|
||||
* @file pyecasound.c Python interface to the ecasound control interface
|
||||
*/
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// pyecasound.cpp: Python interface to the ecasound control interface
|
||||
// Copyright (C) 2000-2002,2008 Kai Vehmanen
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 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 02111-1307 USA
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
#include <Python.h>
|
||||
#include <ecasoundc.h>
|
||||
#include "pyecasound.h"
|
||||
|
||||
typedef struct {
|
||||
PyObject_HEAD
|
||||
eci_handle_t eci;
|
||||
} pyeca_control_t;
|
||||
|
||||
// staticforward PyTypeObject pyeca_control_type;
|
||||
|
||||
static void pyeca_control_del(PyObject *self, PyObject *args);
|
||||
static PyObject* pyeca_getattr(PyObject *self, char *name);
|
||||
|
||||
// ********************************************************************/
|
||||
|
||||
static PyObject * pyeca_command(PyObject* self, PyObject *args)
|
||||
{
|
||||
char *str;
|
||||
pyeca_control_t *selfp;
|
||||
|
||||
if (!PyArg_ParseTuple(args, "s", &str)) return NULL;
|
||||
selfp = (pyeca_control_t*) self;
|
||||
eci_command_r(selfp->eci, str);
|
||||
|
||||
return Py_BuildValue("");
|
||||
}
|
||||
|
||||
static PyObject * pyeca_command_float_arg(PyObject* self, PyObject *args)
|
||||
{
|
||||
char *str;
|
||||
double v;
|
||||
pyeca_control_t *selfp;
|
||||
|
||||
if (!PyArg_ParseTuple(args, "sd", &str, &v)) return NULL;
|
||||
selfp = (pyeca_control_t*) self;
|
||||
|
||||
eci_command_float_arg_r(selfp->eci, str, v);
|
||||
|
||||
return Py_BuildValue("");
|
||||
}
|
||||
|
||||
static PyObject * pyeca_last_string_list(PyObject* self, PyObject *args)
|
||||
{
|
||||
pyeca_control_t *selfp = (pyeca_control_t*) self;
|
||||
int count = eci_last_string_list_count_r(selfp->eci);
|
||||
int n;
|
||||
|
||||
PyObject *list = Py_BuildValue("[]");
|
||||
for(n = 0; n < count; n++) {
|
||||
PyList_Append(list, Py_BuildValue("s", eci_last_string_list_item_r(selfp->eci, n)));
|
||||
}
|
||||
|
||||
return(list);
|
||||
}
|
||||
|
||||
static PyObject * pyeca_last_string(PyObject* self, PyObject *args)
|
||||
{
|
||||
pyeca_control_t *selfp = (pyeca_control_t*) self;
|
||||
return Py_BuildValue("s", eci_last_string_r(selfp->eci));
|
||||
}
|
||||
|
||||
static PyObject * pyeca_last_float(PyObject* self, PyObject *args)
|
||||
{
|
||||
pyeca_control_t *selfp = (pyeca_control_t*) self;
|
||||
return Py_BuildValue("d", eci_last_float_r(selfp->eci));
|
||||
}
|
||||
|
||||
static PyObject * pyeca_last_integer(PyObject* self, PyObject *args)
|
||||
{
|
||||
pyeca_control_t *selfp = (pyeca_control_t*) self;
|
||||
return Py_BuildValue("i", eci_last_integer_r(selfp->eci));
|
||||
}
|
||||
|
||||
static PyObject * pyeca_last_long_integer(PyObject* self, PyObject *args)
|
||||
{
|
||||
pyeca_control_t *selfp = (pyeca_control_t*) self;
|
||||
return Py_BuildValue("l", eci_last_long_integer_r(selfp->eci));
|
||||
}
|
||||
|
||||
static PyObject * pyeca_last_error(PyObject* self, PyObject *args)
|
||||
{
|
||||
pyeca_control_t *selfp = (pyeca_control_t*) self;
|
||||
return Py_BuildValue("s", eci_last_error_r(selfp->eci));
|
||||
}
|
||||
|
||||
static PyObject * pyeca_error(PyObject* self, PyObject *args)
|
||||
{
|
||||
pyeca_control_t *selfp = (pyeca_control_t*) self;
|
||||
int i = eci_error_r(selfp->eci);
|
||||
return Py_BuildValue("i", i);
|
||||
}
|
||||
|
||||
static PyObject * pyeca_last_type(PyObject* self, PyObject *args)
|
||||
{
|
||||
pyeca_control_t *selfp = (pyeca_control_t*) self;
|
||||
return Py_BuildValue("s", eci_last_type_r(selfp->eci));
|
||||
}
|
||||
|
||||
static PyObject * pyeca_events_available(PyObject* self, PyObject *args)
|
||||
{
|
||||
return Py_BuildValue("i", 0);
|
||||
}
|
||||
|
||||
static PyObject * pyeca_next_event(PyObject* self, PyObject *args)
|
||||
{
|
||||
return Py_BuildValue("");
|
||||
}
|
||||
|
||||
static PyObject * pyeca_current_event(PyObject* self, PyObject *args)
|
||||
{
|
||||
return Py_BuildValue("");
|
||||
}
|
||||
|
||||
static struct PyMethodDef pyeca_control_methods[] = {
|
||||
{ "command", pyeca_command, METH_VARARGS},
|
||||
{ "command_float_arg", pyeca_command_float_arg, METH_VARARGS},
|
||||
{ "last_string_list", pyeca_last_string_list, METH_VARARGS},
|
||||
{ "last_string", pyeca_last_string, METH_VARARGS},
|
||||
{ "last_float", pyeca_last_float, METH_VARARGS},
|
||||
{ "last_integer", pyeca_last_integer, METH_VARARGS},
|
||||
{ "last_long_integer", pyeca_last_long_integer, METH_VARARGS},
|
||||
{ "last_error", pyeca_last_error, METH_VARARGS},
|
||||
{ "last_type", pyeca_last_type, METH_VARARGS},
|
||||
{ "error", pyeca_error, METH_VARARGS},
|
||||
{ "events_available", pyeca_events_available, METH_VARARGS},
|
||||
{ "next_event", pyeca_next_event, METH_VARARGS},
|
||||
{ "current_event", pyeca_current_event, METH_VARARGS},
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
||||
// ********************************************************************/
|
||||
|
||||
static PyTypeObject pyeca_control_type = {
|
||||
PyObject_HEAD_INIT(&PyType_Type)
|
||||
0,
|
||||
"ECA_CONTROL_INTERFACE",
|
||||
sizeof (pyeca_control_t),
|
||||
0,
|
||||
(destructor) pyeca_control_del,
|
||||
0,
|
||||
(getattrfunc) pyeca_getattr,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
};
|
||||
|
||||
// ********************************************************************/
|
||||
|
||||
static PyObject *pyeca_control_new(PyObject *self, PyObject *args)
|
||||
{
|
||||
pyeca_control_t *selfp = (pyeca_control_t*) PyObject_New(pyeca_control_t, &pyeca_control_type);
|
||||
|
||||
selfp->eci = eci_init_r();
|
||||
self = (PyObject *) selfp;
|
||||
|
||||
return(self);
|
||||
}
|
||||
|
||||
static PyObject* pyeca_getattr(PyObject *self, char *name)
|
||||
{
|
||||
return Py_FindMethod(pyeca_control_methods, (PyObject*) self, name);
|
||||
}
|
||||
|
||||
static void pyeca_control_del(PyObject *self, PyObject *args)
|
||||
{
|
||||
pyeca_control_t *selfp = (pyeca_control_t*) self;
|
||||
|
||||
eci_cleanup_r(selfp->eci);
|
||||
|
||||
PyObject_Del(self);
|
||||
}
|
||||
|
||||
static PyMethodDef pyecamethods[] = {
|
||||
{"ECA_CONTROL_INTERFACE", pyeca_control_new, METH_VARARGS },
|
||||
{NULL, NULL }
|
||||
};
|
||||
|
||||
void initpyecasound(void)
|
||||
{
|
||||
Py_InitModule("pyecasound", pyecamethods);
|
||||
}
|
14
library/ecasound/pyecasound/pyecasound.h
Normal file
14
library/ecasound/pyecasound/pyecasound.h
Normal file
|
@ -0,0 +1,14 @@
|
|||
#ifndef INCLUDED_PYECASOUND_H
|
||||
#define INCLUDED_PYECASOUND_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void initpyecasound(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
91
library/ecasound/pyecasound/test1_stresstest.py
Executable file
91
library/ecasound/pyecasound/test1_stresstest.py
Executable file
|
@ -0,0 +1,91 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
# -----------------------------------------------------------------------
|
||||
# Runs a stress test using the pyeca interface
|
||||
#
|
||||
# Copyright (C) 2003 Kai Vehmanen (kai.vehmanen@wakkanet.fi)
|
||||
# Licensed under GPL. See the file 'COPYING' for more information.
|
||||
# -----------------------------------------------------------------------
|
||||
|
||||
import time
|
||||
import sys
|
||||
import os
|
||||
|
||||
# ---
|
||||
# select pyeca implementation to use
|
||||
|
||||
# test the default implementation
|
||||
from pyeca import *
|
||||
|
||||
# test the native Python implementation
|
||||
#from ecacontrol import *
|
||||
|
||||
# test the C implementation
|
||||
#from pyecasound import *
|
||||
|
||||
# ---
|
||||
# configuration variables
|
||||
|
||||
# run for how many seconds
|
||||
runlen = 5
|
||||
# debug level (0, 1, 2, ...)
|
||||
debuglevel = 1
|
||||
|
||||
if os.path.isfile('../ecasound/ecasound_debug'):
|
||||
os.environ['ECASOUND'] = '../ecasound/ecasound_debug'
|
||||
|
||||
if os.path.isfile('../ecasound/ecasound'):
|
||||
os.environ['ECASOUND'] = '../ecasound/ecasound'
|
||||
|
||||
# if above tests fail, the default ecasound binary
|
||||
# will be used
|
||||
|
||||
# main program
|
||||
e = ECA_CONTROL_INTERFACE(debuglevel)
|
||||
result = 0
|
||||
|
||||
e.command("cs-add play_chainsetup")
|
||||
e.command("c-add 1st_chain")
|
||||
e.command("ai-add rtnull")
|
||||
e.command("ao-add null")
|
||||
e.command("cop-add -ezx:1,0.0")
|
||||
e.command("ctrl-add -kos:2,-1,1,300,0")
|
||||
e.command("cop-add -efl:300")
|
||||
e.command("cop-add -evp")
|
||||
e.command("cop-select 3")
|
||||
e.command("copp-select 1")
|
||||
e.command("cs-connect")
|
||||
e.command("start")
|
||||
|
||||
total_cmds = 0
|
||||
|
||||
while 1 and e.last_type() != 'e':
|
||||
e.command("get-position")
|
||||
curpos = e.last_float()
|
||||
if curpos > runlen or e.last_type() == 'e': break
|
||||
e.command("copp-get")
|
||||
if debuglevel == 2:
|
||||
#print curpos, e.last_float()
|
||||
#if curpos == None:
|
||||
# curpos = 0.0
|
||||
sys.stderr.write('%6.2f %6.4f\r' % (curpos,e.last_float()))
|
||||
else:
|
||||
if debuglevel == 1:
|
||||
sys.stderr.write('.')
|
||||
|
||||
total_cmds = total_cmds + 2
|
||||
|
||||
if e.last_type() == 'e':
|
||||
print 'Ended to error:', e.last_error()
|
||||
result = -1
|
||||
else:
|
||||
e.command("stop")
|
||||
e.command("cs-disconnect")
|
||||
|
||||
if debuglevel == 2:
|
||||
sys.stderr.write('\nprocessing speed: ' + str(total_cmds / runlen) + ' cmds/second.\n')
|
||||
|
||||
if debuglevel > 0:
|
||||
sys.stderr.write('\n')
|
||||
|
||||
sys.exit(result)
|
91
library/ecasound/pyecasound/test2_stresstest.py
Executable file
91
library/ecasound/pyecasound/test2_stresstest.py
Executable file
|
@ -0,0 +1,91 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
# -----------------------------------------------------------------------
|
||||
# A second stress test for the pyeca interface
|
||||
#
|
||||
# Copyright (C) 2003 Kai Vehmanen (kai.vehmanen@wakkanet.fi)
|
||||
# Licensed under GPL. See the file 'COPYING' for more information.
|
||||
# -----------------------------------------------------------------------
|
||||
|
||||
import time
|
||||
import sys
|
||||
import os
|
||||
|
||||
# ---
|
||||
# select pyeca implementation to use
|
||||
|
||||
# test the default implementation
|
||||
from pyeca import *
|
||||
|
||||
# test the native Python implementation
|
||||
#from ecacontrol import *
|
||||
|
||||
# test the C implementation
|
||||
#from pyecasound import *
|
||||
|
||||
# ---
|
||||
# configuration variables
|
||||
|
||||
# run for how many seconds
|
||||
runlen = 5
|
||||
# debug level (0, 1, 2, ...)
|
||||
debuglevel = 1
|
||||
|
||||
if os.path.isfile('../ecasound/ecasound_debug'):
|
||||
os.environ['ECASOUND'] = '../ecasound/ecasound_debug'
|
||||
|
||||
if os.path.isfile('../ecasound/ecasound'):
|
||||
os.environ['ECASOUND'] = '../ecasound/ecasound'
|
||||
|
||||
# if above tests fail, the default ecasound binary
|
||||
# will be used
|
||||
|
||||
# main program
|
||||
e = ECA_CONTROL_INTERFACE(debuglevel)
|
||||
result = 0
|
||||
|
||||
e.command("cs-add play_chainsetup")
|
||||
e.command("c-add 1st_chain")
|
||||
e.command("ai-add rtnull")
|
||||
e.command("ao-add null")
|
||||
e.command("cop-add -ezx:1,0.0")
|
||||
e.command("ctrl-add -kos:2,-1,1,300,0")
|
||||
e.command("cop-add -efl:300")
|
||||
e.command("cop-add -evp")
|
||||
e.command("cop-select 3")
|
||||
e.command("copp-select 1")
|
||||
e.command("cs-connect")
|
||||
e.command("start")
|
||||
|
||||
total_cmds = 0
|
||||
|
||||
while 1 and e.last_type() != 'e':
|
||||
e.command("get-position")
|
||||
curpos = e.last_float()
|
||||
if curpos > runlen or e.last_type() == 'e': break
|
||||
|
||||
if debuglevel > 0:
|
||||
sys.stderr.write('.')
|
||||
|
||||
# some commands that return a lot
|
||||
# of return data
|
||||
e.command("cop-register")
|
||||
e.command("aio-register")
|
||||
e.command("int-cmd-list")
|
||||
|
||||
total_cmds = total_cmds + 4
|
||||
|
||||
if e.last_type() == 'e':
|
||||
print 'Ended to error:', e.last_error()
|
||||
result = -1
|
||||
else:
|
||||
e.command("stop")
|
||||
e.command("cs-disconnect")
|
||||
|
||||
if debuglevel == 2:
|
||||
sys.stderr.write('\nprocessing speed: ' + str(total_cmds / runlen) + ' cmds/second.\n')
|
||||
|
||||
if debuglevel > 0:
|
||||
sys.stderr.write('\n')
|
||||
|
||||
sys.exit(result)
|
Loading…
Add table
Add a link
Reference in a new issue