From ed4094208c501e91838ccc333059e4731e8ae908 Mon Sep 17 00:00:00 2001 From: Rob Savoye Date: Thu, 14 Oct 2010 12:34:08 -0600 Subject: regenerated after changes to the template --- gr-audio-portaudio/src/Makefile.swig.gen | 59 ++++++++++++++++++++++++-------- 1 file changed, 45 insertions(+), 14 deletions(-) (limited to 'gr-audio-portaudio/src') diff --git a/gr-audio-portaudio/src/Makefile.swig.gen b/gr-audio-portaudio/src/Makefile.swig.gen index 368f2e328..59e317a5e 100644 --- a/gr-audio-portaudio/src/Makefile.swig.gen +++ b/gr-audio-portaudio/src/Makefile.swig.gen @@ -72,7 +72,7 @@ MOSTLYCLEANFILES += $(DEPDIR)/*.S* ## .h file is sometimes built, but not always ... so that one has to ## be added manually by the including Makefile.am . -swig_built_sources += audio_portaudio.py audio_portaudio.cc +swig_built_sources += audio_portaudio.py audio_portaudio_python.cc ## Various SWIG variables. These can be overloaded in the including ## Makefile.am by setting the variable value there, then including @@ -83,21 +83,21 @@ audio_portaudio_swiginclude_HEADERS = \ $(audio_portaudio_swiginclude_headers) audio_portaudio_pylib_LTLIBRARIES = \ - _audio_portaudio.la + _audio_portaudio_python.la -_audio_portaudio_la_SOURCES = \ - audio_portaudio.cc \ +_audio_portaudio_python_la_SOURCES = \ + audio_portaudio_python.cc \ $(audio_portaudio_la_swig_sources) -_audio_portaudio_la_LIBADD = \ +_audio_portaudio_python_la_LIBADD = \ $(STD_SWIG_LA_LIB_ADD) \ $(audio_portaudio_la_swig_libadd) -_audio_portaudio_la_LDFLAGS = \ +_audio_portaudio_python_la_LDFLAGS = \ $(STD_SWIG_LA_LD_FLAGS) \ $(audio_portaudio_la_swig_ldflags) -_audio_portaudio_la_CXXFLAGS = \ +_audio_portaudio_python_la_CXXFLAGS = \ $(STD_SWIG_CXX_FLAGS) \ $(audio_portaudio_la_swig_cxxflags) @@ -105,9 +105,23 @@ audio_portaudio_python_PYTHON = \ audio_portaudio.py \ $(audio_portaudio_python) +if GUILE +audio_portaudio_pylib_LTLIBRARIES += _audio_portaudio_guile.la + +_audio_portaudio_guile_la_SOURCES = \ + audio_portaudio_guile.cc \ + $(audio_portaudio_la_swig_sources) + +# Guile can use the same flags as python does +_audio_portaudio_guile_la_LIBADD = $(_audio_portaudio_python_la_LIBADD) +_audio_portaudio_guile_la_LDFLAGS = $(_audio_portaudio_python_la_LDFLAGS) +_audio_portaudio_guile_la_CXXFLAGS = $(_audio_portaudio_python_la_CXXFLAGS) + +endif # end of GUILE + ## Entry rule for running SWIG -audio_portaudio.h audio_portaudio.py audio_portaudio.cc: audio_portaudio.i +audio_portaudio.h audio_portaudio.py audio_portaudio_python.cc: audio_portaudio.i ## This rule will get called only when MAKE decides that one of the ## targets needs to be created or re-created, because: ## @@ -159,11 +173,12 @@ audio_portaudio.h audio_portaudio.py audio_portaudio.cc: audio_portaudio.i ## ## Remove the stamp associated with this filename. ## - rm -f $(DEPDIR)/audio_portaudio-generate-stamp; \ + rm -f $(DEPDIR)/audio_portaudio-generate-*stamp; \ ## ## Tell MAKE to run the rule for creating this stamp. ## - $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/audio_portaudio-generate-stamp WHAT=$<; \ + $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/audio_portaudio-generate-python-stamp WHAT=$<; \ + $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/audio_portaudio-generate-guile-stamp WHAT=$<; \ ## ## Now that the .cc, .h, and .py files have been (re)created from the ## .i file, future checking of this rule during the same MAKE @@ -187,11 +202,27 @@ audio_portaudio.h audio_portaudio.py audio_portaudio.cc: audio_portaudio.i ## Succeed if and only if the first process succeeded; exit this ## process returning the status of the generated stamp. ## - test -f $(DEPDIR)/audio_portaudio-generate-stamp; \ + test -f $(DEPDIR)/audio_portaudio-generate-python-stamp; \ exit $$?; \ fi; -$(DEPDIR)/audio_portaudio-generate-stamp: +$(DEPDIR)/audio_portaudio-generate-guile-stamp: + if $(SWIG) $(STD_SWIG_GUILE_ARGS) $(audio_portaudio_swig_args) \ + -MD -MF $(DEPDIR)/audio_portaudio.Std \ + -module audio_portaudio -o audio_portaudio_guile.cc $(WHAT); then \ + if test $(host_os) = mingw32; then \ + $(RM) $(DEPDIR)/audio_portaudio.Sd; \ + $(SED) 's,\\\\,/,g' < $(DEPDIR)/audio_portaudio.Std \ + > $(DEPDIR)/audio_portaudio.Sd; \ + $(RM) $(DEPDIR)/audio_portaudio.Std; \ + $(MV) $(DEPDIR)/audio_portaudio.Sd $(DEPDIR)/audio_portaudio.Std; \ + fi; \ + else \ + $(RM) $(DEPDIR)/audio_portaudio.S*; exit 1; \ + fi; + touch $(DEPDIR)/audio_portaudio-generate-guile-stamp + +$(DEPDIR)/audio_portaudio-generate-python-stamp: ## This rule will be called only by the first process issuing the ## above rule to succeed in creating the lock directory, after ## removing the actual stamp file in order to guarantee that MAKE will @@ -202,7 +233,7 @@ $(DEPDIR)/audio_portaudio-generate-stamp: ## if $(SWIG) $(STD_SWIG_PYTHON_ARGS) $(audio_portaudio_swig_args) \ -MD -MF $(DEPDIR)/audio_portaudio.Std \ - -module audio_portaudio -o audio_portaudio.cc $(WHAT); then \ + -module audio_portaudio -o audio_portaudio_python.cc $(WHAT); then \ if test $(host_os) = mingw32; then \ $(RM) $(DEPDIR)/audio_portaudio.Sd; \ $(SED) 's,\\\\,/,g' < $(DEPDIR)/audio_portaudio.Std \ @@ -249,7 +280,7 @@ $(DEPDIR)/audio_portaudio-generate-stamp: ## executing this rule; allows other threads waiting on this process ## to continue. ## - touch $(DEPDIR)/audio_portaudio-generate-stamp + touch $(DEPDIR)/audio_portaudio-generate-python-stamp # KLUDGE: Force runtime include of a SWIG dependency file. This is # not guaranteed to be portable, but will probably work. If it works, -- cgit From aa162012cc25cf080ee744a2cb795a6154fcca86 Mon Sep 17 00:00:00 2001 From: Rob Savoye Date: Thu, 21 Oct 2010 13:16:05 -0600 Subject: regenerated --- gr-audio-portaudio/src/Makefile.swig.gen | 221 ++++++------------------------- 1 file changed, 39 insertions(+), 182 deletions(-) (limited to 'gr-audio-portaudio/src') diff --git a/gr-audio-portaudio/src/Makefile.swig.gen b/gr-audio-portaudio/src/Makefile.swig.gen index 59e317a5e..42da0e199 100644 --- a/gr-audio-portaudio/src/Makefile.swig.gen +++ b/gr-audio-portaudio/src/Makefile.swig.gen @@ -38,6 +38,16 @@ audio_portaudio_pylibdir_category ?= $(audio_portaudio_pythondir_category) audio_portaudio_pythondir = $(pythondir)/$(audio_portaudio_pythondir_category) audio_portaudio_pylibdir = $(pyexecdir)/$(audio_portaudio_pylibdir_category) +# The .so libraries for the guile modules get installed whereever guile +# is installed, usually /usr/lib/guile/gnuradio/ +# FIXME: determince whether these should be installed with gnuradio. +audio_portaudio_scmlibdir = @GUILE_PKLIBDIR@/gnuradio + +# The scm files for the guile modules get installed where ever guile +# is installed, usually /usr/share/guile/site/audio_portaudio +# FIXME: determince whether these should be installed with gnuradio. +audio_portaudio_scmdir = @GUILE_PKDATADIR@/gnuradio + ## SWIG headers are always installed into the same directory. audio_portaudio_swigincludedir = $(swigincludedir) @@ -72,7 +82,12 @@ MOSTLYCLEANFILES += $(DEPDIR)/*.S* ## .h file is sometimes built, but not always ... so that one has to ## be added manually by the including Makefile.am . -swig_built_sources += audio_portaudio.py audio_portaudio_python.cc +# generating the py or scm file also generates the .cc or .h files, +# but dependencies work better without the .cc ort .h files listed. +swig_built_sources += audio_portaudio.py +if GUILE +swig_built_sources += audio_portaudio.scm +endif ## Various SWIG variables. These can be overloaded in the including ## Makefile.am by setting the variable value there, then including @@ -83,208 +98,50 @@ audio_portaudio_swiginclude_HEADERS = \ $(audio_portaudio_swiginclude_headers) audio_portaudio_pylib_LTLIBRARIES = \ - _audio_portaudio_python.la + _audio_portaudio.la -_audio_portaudio_python_la_SOURCES = \ - audio_portaudio_python.cc \ +_audio_portaudio_la_SOURCES = \ + python/audio_portaudio.cc \ $(audio_portaudio_la_swig_sources) -_audio_portaudio_python_la_LIBADD = \ +_audio_portaudio_la_LIBADD = \ $(STD_SWIG_LA_LIB_ADD) \ $(audio_portaudio_la_swig_libadd) -_audio_portaudio_python_la_LDFLAGS = \ +# _audio_portaudio_la_DEPENDENCIES = python/audio_portaudio.lo + +_audio_portaudio_la_LDFLAGS = \ $(STD_SWIG_LA_LD_FLAGS) \ $(audio_portaudio_la_swig_ldflags) -_audio_portaudio_python_la_CXXFLAGS = \ +_audio_portaudio_la_CXXFLAGS = \ $(STD_SWIG_CXX_FLAGS) \ + -I$(top_builddir) \ $(audio_portaudio_la_swig_cxxflags) audio_portaudio_python_PYTHON = \ audio_portaudio.py \ - $(audio_portaudio_python) + $(audio_portaudio) if GUILE -audio_portaudio_pylib_LTLIBRARIES += _audio_portaudio_guile.la - -_audio_portaudio_guile_la_SOURCES = \ - audio_portaudio_guile.cc \ +audio_portaudio_scmlib_LTLIBRARIES = audio_portaudio_guile.la +audio_portaudio_guile_la_SOURCES = \ + guile/audio_portaudio.cc \ $(audio_portaudio_la_swig_sources) +audio_portaudio_scm_DATA = audio_portaudio.scm # Guile can use the same flags as python does -_audio_portaudio_guile_la_LIBADD = $(_audio_portaudio_python_la_LIBADD) -_audio_portaudio_guile_la_LDFLAGS = $(_audio_portaudio_python_la_LDFLAGS) -_audio_portaudio_guile_la_CXXFLAGS = $(_audio_portaudio_python_la_CXXFLAGS) - -endif # end of GUILE +audio_portaudio_guile_la_LIBADD = $(_audio_portaudio_la_LIBADD) +audio_portaudio_guile_la_LDFLAGS = $(_audio_portaudio_la_LDFLAGS) +audio_portaudio_guile_la_CXXFLAGS = $(_audio_portaudio_la_CXXFLAGS) -## Entry rule for running SWIG +guile/audio_portaudio.lo: audio_portaudio.lo +audio_portaudio.scm: audio_portaudio.i -audio_portaudio.h audio_portaudio.py audio_portaudio_python.cc: audio_portaudio.i -## This rule will get called only when MAKE decides that one of the -## targets needs to be created or re-created, because: -## -## * The .i file is newer than any or all of the generated files; -## -## * Any or all of the .cc, .h, or .py files does not exist and is -## needed (in the case this file is not needed, the rule for it is -## ignored); or -## -## * Some SWIG-based dependecy of the .cc file isn't met and hence the -## .cc file needs be be regenerated. Explanation: Because MAKE -## knows how to handle dependencies for .cc files (regardless of -## their name or extension), then the .cc file is used as a target -## instead of the .i file -- but with the dependencies of the .i -## file. It is this last reason why the line: -## -## if test -f $@; then :; else -## -## cannot be used in this case: If a .i file dependecy is not met, -## then the .cc file needs to be rebuilt. But if the stamp is newer -## than the .cc file, and the .cc file exists, then in the original -## version (with the 'test' above) the internal MAKE call will not -## be issued and hence the .cc file will not be rebuilt. -## -## Once execution gets to here, it should always proceed no matter the -## state of a stamp (as discussed in link above). The -## $(DEPDIR)/audio_portaudio-generate stuff is used to allow for parallel -## builds to "do the right thing". The stamp has no relationship with -## either the target files or dependency file; it is used solely for -## the protection of multiple builds during a given call to MAKE. -## -## Catch signals SIGHUP (1), SIGINT (2), SIGPIPE (13), and SIGTERM -## (15). At a caught signal, the quoted command will be issued before -## exiting. In this case, remove any stamp, whether temporary of not. -## The trap is valid until the process exits; the process includes all -## commands appended via "\"s. -## - trap 'rm -rf $(DEPDIR)/audio_portaudio-generate-*' 1 2 13 15; \ -## -## Create a temporary directory, which acts as a lock. The first -## process to create the directory will succeed and issue the MAKE -## command to do the actual work, while all subsequent processes will -## fail -- leading them to wait for the first process to finish. -## - if mkdir $(DEPDIR)/audio_portaudio-generate-lock 2>/dev/null; then \ -## -## This code is being executed by the first process to succeed in -## creating the directory lock. -## -## Remove the stamp associated with this filename. -## - rm -f $(DEPDIR)/audio_portaudio-generate-*stamp; \ -## -## Tell MAKE to run the rule for creating this stamp. -## - $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/audio_portaudio-generate-python-stamp WHAT=$<; \ - $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/audio_portaudio-generate-guile-stamp WHAT=$<; \ -## -## Now that the .cc, .h, and .py files have been (re)created from the -## .i file, future checking of this rule during the same MAKE -## execution will come back that the rule doesn't need to be executed -## because none of the conditions mentioned at the start of this rule -## will be positive. Remove the the directory lock, which frees up -## any waiting process(es) to continue. -## - rmdir $(DEPDIR)/audio_portaudio-generate-lock; \ - else \ -## -## This code is being executed by any follower processes while the -## directory lock is in place. -## -## Wait until the first process is done, testing once per second. -## - while test -d $(DEPDIR)/audio_portaudio-generate-lock; do \ - sleep 1; \ - done; \ -## -## Succeed if and only if the first process succeeded; exit this -## process returning the status of the generated stamp. -## - test -f $(DEPDIR)/audio_portaudio-generate-python-stamp; \ - exit $$?; \ - fi; - -$(DEPDIR)/audio_portaudio-generate-guile-stamp: - if $(SWIG) $(STD_SWIG_GUILE_ARGS) $(audio_portaudio_swig_args) \ - -MD -MF $(DEPDIR)/audio_portaudio.Std \ - -module audio_portaudio -o audio_portaudio_guile.cc $(WHAT); then \ - if test $(host_os) = mingw32; then \ - $(RM) $(DEPDIR)/audio_portaudio.Sd; \ - $(SED) 's,\\\\,/,g' < $(DEPDIR)/audio_portaudio.Std \ - > $(DEPDIR)/audio_portaudio.Sd; \ - $(RM) $(DEPDIR)/audio_portaudio.Std; \ - $(MV) $(DEPDIR)/audio_portaudio.Sd $(DEPDIR)/audio_portaudio.Std; \ - fi; \ - else \ - $(RM) $(DEPDIR)/audio_portaudio.S*; exit 1; \ - fi; - touch $(DEPDIR)/audio_portaudio-generate-guile-stamp - -$(DEPDIR)/audio_portaudio-generate-python-stamp: -## This rule will be called only by the first process issuing the -## above rule to succeed in creating the lock directory, after -## removing the actual stamp file in order to guarantee that MAKE will -## execute this rule. -## -## Call SWIG to generate the various output files; special -## post-processing on 'mingw32' host OS for the dependency file. -## - if $(SWIG) $(STD_SWIG_PYTHON_ARGS) $(audio_portaudio_swig_args) \ - -MD -MF $(DEPDIR)/audio_portaudio.Std \ - -module audio_portaudio -o audio_portaudio_python.cc $(WHAT); then \ - if test $(host_os) = mingw32; then \ - $(RM) $(DEPDIR)/audio_portaudio.Sd; \ - $(SED) 's,\\\\,/,g' < $(DEPDIR)/audio_portaudio.Std \ - > $(DEPDIR)/audio_portaudio.Sd; \ - $(RM) $(DEPDIR)/audio_portaudio.Std; \ - $(MV) $(DEPDIR)/audio_portaudio.Sd $(DEPDIR)/audio_portaudio.Std; \ - fi; \ - else \ - $(RM) $(DEPDIR)/audio_portaudio.S*; exit 1; \ - fi; -## -## Mess with the SWIG output .Std dependency file, to create a -## dependecy file valid for the input .i file: Basically, simulate the -## dependency file created for libraries by GNU's libtool for C++, -## where all of the dependencies for the target are first listed, then -## each individual dependency is listed as a target with no further -## dependencies. -## -## (1) remove the current dependency file -## - $(RM) $(DEPDIR)/audio_portaudio.d -## -## (2) Copy the whole SWIG file: -## - cp $(DEPDIR)/audio_portaudio.Std $(DEPDIR)/audio_portaudio.d -## -## (3) all a carriage return to the end of the dependency file. -## - echo "" >> $(DEPDIR)/audio_portaudio.d -## -## (4) from the SWIG file, remove the first line (the target); remove -## trailing " \" and " " from each line. Append ":" to each line, -## followed by 2 carriage returns, then append this to the end of -## the dependency file. -## - $(SED) -e '1d;s, \\,,g;s, ,,g' < $(DEPDIR)/audio_portaudio.Std | \ - awk '{ printf "%s:\n\n", $$0 }' >> $(DEPDIR)/audio_portaudio.d -## -## (5) remove the SWIG-generated file -## - $(RM) $(DEPDIR)/audio_portaudio.Std -## -## Create the stamp for this filename generation, to signal success in -## executing this rule; allows other threads waiting on this process -## to continue. -## - touch $(DEPDIR)/audio_portaudio-generate-python-stamp +endif # end of GUILE -# KLUDGE: Force runtime include of a SWIG dependency file. This is -# not guaranteed to be portable, but will probably work. If it works, -# we have accurate dependencies for our swig stuff, which is good. +python/audio_portaudio.lo: +audio_portaudio.lo: audio_portaudio.py audio_portaudio.scm +audio_portaudio.py: audio_portaudio.i -@am__include@ @am__quote@./$(DEPDIR)/audio_portaudio.d@am__quote@ -- cgit From 32a71023bf7350167fdd4f3797d384d47cafd71f Mon Sep 17 00:00:00 2001 From: Rob Savoye Date: Thu, 21 Oct 2010 13:17:11 -0600 Subject: add python/*.cc to SOURCES so dependencies work properly. --- gr-audio-portaudio/src/Makefile.am | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gr-audio-portaudio/src') diff --git a/gr-audio-portaudio/src/Makefile.am b/gr-audio-portaudio/src/Makefile.am index 4fa098dcc..c5c8421c2 100644 --- a/gr-audio-portaudio/src/Makefile.am +++ b/gr-audio-portaudio/src/Makefile.am @@ -42,7 +42,8 @@ lib_LTLIBRARIES = libgnuradio-audio-portaudio.la libgnuradio_audio_portaudio_la_SOURCES = \ audio_portaudio_sink.cc \ audio_portaudio_source.cc \ - gri_portaudio.cc + gri_portaudio.cc \ + python/audio_portaudio.cc libgnuradio_audio_portaudio_la_LIBADD = \ $(GNURADIO_CORE_LA) \ -- cgit From 1e34972f4433cbfef3500fc73a285c7c436cfd6b Mon Sep 17 00:00:00 2001 From: Eric Blossom Date: Fri, 22 Oct 2010 22:00:09 -0700 Subject: Rengenerate Makefile.swig.gen's --- gr-audio-portaudio/src/Makefile.swig.gen | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gr-audio-portaudio/src') diff --git a/gr-audio-portaudio/src/Makefile.swig.gen b/gr-audio-portaudio/src/Makefile.swig.gen index 42da0e199..17d4624de 100644 --- a/gr-audio-portaudio/src/Makefile.swig.gen +++ b/gr-audio-portaudio/src/Makefile.swig.gen @@ -41,12 +41,12 @@ audio_portaudio_pylibdir = $(pyexecdir)/$(audio_portaudio_pylibdir_category) # The .so libraries for the guile modules get installed whereever guile # is installed, usually /usr/lib/guile/gnuradio/ # FIXME: determince whether these should be installed with gnuradio. -audio_portaudio_scmlibdir = @GUILE_PKLIBDIR@/gnuradio +audio_portaudio_scmlibdir = $(libdir)/guile/gnuradio # The scm files for the guile modules get installed where ever guile # is installed, usually /usr/share/guile/site/audio_portaudio # FIXME: determince whether these should be installed with gnuradio. -audio_portaudio_scmdir = @GUILE_PKDATADIR@/gnuradio +audio_portaudio_scmdir = $(guiledir)/gnuradio ## SWIG headers are always installed into the same directory. @@ -144,4 +144,5 @@ python/audio_portaudio.lo: audio_portaudio.lo: audio_portaudio.py audio_portaudio.scm audio_portaudio.py: audio_portaudio.i +-include python/audio_portaudio.d -- cgit From 6421d47062f4bf5abbdf26142616a5965f1edfa0 Mon Sep 17 00:00:00 2001 From: Eric Blossom Date: Fri, 22 Oct 2010 23:28:06 -0700 Subject: regenerate --- gr-audio-portaudio/src/Makefile.swig.gen | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'gr-audio-portaudio/src') diff --git a/gr-audio-portaudio/src/Makefile.swig.gen b/gr-audio-portaudio/src/Makefile.swig.gen index 17d4624de..a76a9c90c 100644 --- a/gr-audio-portaudio/src/Makefile.swig.gen +++ b/gr-audio-portaudio/src/Makefile.swig.gen @@ -41,7 +41,7 @@ audio_portaudio_pylibdir = $(pyexecdir)/$(audio_portaudio_pylibdir_category) # The .so libraries for the guile modules get installed whereever guile # is installed, usually /usr/lib/guile/gnuradio/ # FIXME: determince whether these should be installed with gnuradio. -audio_portaudio_scmlibdir = $(libdir)/guile/gnuradio +audio_portaudio_scmlibdir = $(libdir) # The scm files for the guile modules get installed where ever guile # is installed, usually /usr/share/guile/site/audio_portaudio @@ -124,16 +124,16 @@ audio_portaudio_python_PYTHON = \ $(audio_portaudio) if GUILE -audio_portaudio_scmlib_LTLIBRARIES = audio_portaudio_guile.la -audio_portaudio_guile_la_SOURCES = \ +audio_portaudio_scmlib_LTLIBRARIES = libguile-audio_portaudio.la +libguile_audio_portaudio_la_SOURCES = \ guile/audio_portaudio.cc \ $(audio_portaudio_la_swig_sources) audio_portaudio_scm_DATA = audio_portaudio.scm # Guile can use the same flags as python does -audio_portaudio_guile_la_LIBADD = $(_audio_portaudio_la_LIBADD) -audio_portaudio_guile_la_LDFLAGS = $(_audio_portaudio_la_LDFLAGS) -audio_portaudio_guile_la_CXXFLAGS = $(_audio_portaudio_la_CXXFLAGS) +libguile_audio_portaudio_la_LIBADD = $(_audio_portaudio_la_LIBADD) +libguile_audio_portaudio_la_LDFLAGS = $(_audio_portaudio_la_LDFLAGS) +libguile_audio_portaudio_la_CXXFLAGS = $(_audio_portaudio_la_CXXFLAGS) guile/audio_portaudio.lo: audio_portaudio.lo audio_portaudio.scm: audio_portaudio.i -- cgit From d94769a975612072dc03fa378bc79856c07cd66b Mon Sep 17 00:00:00 2001 From: Rob Savoye Date: Sat, 30 Oct 2010 12:14:41 -0600 Subject: add load-extension support --- gr-audio-portaudio/src/audio_portaudio.i | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'gr-audio-portaudio/src') diff --git a/gr-audio-portaudio/src/audio_portaudio.i b/gr-audio-portaudio/src/audio_portaudio.i index b0ec2438d..65a1ef60e 100644 --- a/gr-audio-portaudio/src/audio_portaudio.i +++ b/gr-audio-portaudio/src/audio_portaudio.i @@ -70,3 +70,13 @@ class audio_portaudio_sink : public gr_sync_block { public: ~audio_portaudio_sink (); }; + +#if SWIGGUILE +%scheme %{ +(load-extension "libguile-audio_portaudio" "scm_init_gnuradio_audio_portaudio_module") +%} + +%goops %{ +(use-modules (gnuradio gnuradio_core_runtime)) +%} +#endif -- cgit From 8c80b814bcdc00e0e71a1d4174c747a0f221fa20 Mon Sep 17 00:00:00 2001 From: Eric Blossom Date: Sun, 31 Oct 2010 13:23:26 -0700 Subject: regenerated --- gr-audio-portaudio/src/Makefile.swig.gen | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'gr-audio-portaudio/src') diff --git a/gr-audio-portaudio/src/Makefile.swig.gen b/gr-audio-portaudio/src/Makefile.swig.gen index a76a9c90c..7d744ad3a 100644 --- a/gr-audio-portaudio/src/Makefile.swig.gen +++ b/gr-audio-portaudio/src/Makefile.swig.gen @@ -46,7 +46,7 @@ audio_portaudio_scmlibdir = $(libdir) # The scm files for the guile modules get installed where ever guile # is installed, usually /usr/share/guile/site/audio_portaudio # FIXME: determince whether these should be installed with gnuradio. -audio_portaudio_scmdir = $(guiledir)/gnuradio +audio_portaudio_scmdir = $(guiledir) ## SWIG headers are always installed into the same directory. @@ -128,7 +128,7 @@ audio_portaudio_scmlib_LTLIBRARIES = libguile-audio_portaudio.la libguile_audio_portaudio_la_SOURCES = \ guile/audio_portaudio.cc \ $(audio_portaudio_la_swig_sources) -audio_portaudio_scm_DATA = audio_portaudio.scm +nobase_audio_portaudio_scm_DATA = gnuradio/audio_portaudio.scm gnuradio/audio_portaudio-primitive.scm # Guile can use the same flags as python does libguile_audio_portaudio_la_LIBADD = $(_audio_portaudio_la_LIBADD) @@ -137,6 +137,9 @@ libguile_audio_portaudio_la_CXXFLAGS = $(_audio_portaudio_la_CXXFLAGS) guile/audio_portaudio.lo: audio_portaudio.lo audio_portaudio.scm: audio_portaudio.i +gnuradio/audio_portaudio-primitive.scm: audio_portaudio.scm + +-include guile/audio_portaudio.d endif # end of GUILE -- cgit From 0282499102abcef25849ae3a5255902502c1382a Mon Sep 17 00:00:00 2001 From: Eric Blossom Date: Sun, 31 Oct 2010 13:24:29 -0700 Subject: Remove swig generated python code from C++-only libraries --- gr-audio-portaudio/src/Makefile.am | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'gr-audio-portaudio/src') diff --git a/gr-audio-portaudio/src/Makefile.am b/gr-audio-portaudio/src/Makefile.am index c5c8421c2..4fa098dcc 100644 --- a/gr-audio-portaudio/src/Makefile.am +++ b/gr-audio-portaudio/src/Makefile.am @@ -42,8 +42,7 @@ lib_LTLIBRARIES = libgnuradio-audio-portaudio.la libgnuradio_audio_portaudio_la_SOURCES = \ audio_portaudio_sink.cc \ audio_portaudio_source.cc \ - gri_portaudio.cc \ - python/audio_portaudio.cc + gri_portaudio.cc libgnuradio_audio_portaudio_la_LIBADD = \ $(GNURADIO_CORE_LA) \ -- cgit From bc8fd41b84219cd08f057c524fe0b90ffef6f8aa Mon Sep 17 00:00:00 2001 From: Eric Blossom Date: Mon, 1 Nov 2010 16:28:14 -0700 Subject: regenerated --- gr-audio-portaudio/src/Makefile.swig.gen | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'gr-audio-portaudio/src') diff --git a/gr-audio-portaudio/src/Makefile.swig.gen b/gr-audio-portaudio/src/Makefile.swig.gen index 7d744ad3a..05408468a 100644 --- a/gr-audio-portaudio/src/Makefile.swig.gen +++ b/gr-audio-portaudio/src/Makefile.swig.gen @@ -84,10 +84,10 @@ MOSTLYCLEANFILES += $(DEPDIR)/*.S* # generating the py or scm file also generates the .cc or .h files, # but dependencies work better without the .cc ort .h files listed. -swig_built_sources += audio_portaudio.py -if GUILE -swig_built_sources += audio_portaudio.scm -endif +# swig_built_sources += audio_portaudio.py +# if GUILE +# swig_built_sources += gnuradio/audio_portaudio.scm +# endif ## Various SWIG variables. These can be overloaded in the including ## Makefile.am by setting the variable value there, then including @@ -135,15 +135,14 @@ libguile_audio_portaudio_la_LIBADD = $(_audio_portaudio_la_LIBADD) libguile_audio_portaudio_la_LDFLAGS = $(_audio_portaudio_la_LDFLAGS) libguile_audio_portaudio_la_CXXFLAGS = $(_audio_portaudio_la_CXXFLAGS) -guile/audio_portaudio.lo: audio_portaudio.lo -audio_portaudio.scm: audio_portaudio.i -gnuradio/audio_portaudio-primitive.scm: audio_portaudio.scm +guile/audio_portaudio.cc: gnuradio/audio_portaudio.scm +gnuradio/audio_portaudio.scm: audio_portaudio.i +gnuradio/audio_portaudio-primitive.scm: gnuradio/audio_portaudio.scm -include guile/audio_portaudio.d endif # end of GUILE -python/audio_portaudio.lo: audio_portaudio.lo: audio_portaudio.py audio_portaudio.scm audio_portaudio.py: audio_portaudio.i -- cgit From df92b7c6315c567e58e0d9c293d7c9c2699023d3 Mon Sep 17 00:00:00 2001 From: Eric Blossom Date: Wed, 10 Nov 2010 13:01:38 -0800 Subject: regenerated --- gr-audio-portaudio/src/Makefile.swig.gen | 35 ++++++++------------------------ 1 file changed, 9 insertions(+), 26 deletions(-) (limited to 'gr-audio-portaudio/src') diff --git a/gr-audio-portaudio/src/Makefile.swig.gen b/gr-audio-portaudio/src/Makefile.swig.gen index 05408468a..e7817c1e1 100644 --- a/gr-audio-portaudio/src/Makefile.swig.gen +++ b/gr-audio-portaudio/src/Makefile.swig.gen @@ -67,28 +67,10 @@ audio_portaudio_swigincludedir = $(swigincludedir) ## right thing. For more info, see < ## http://sources.redhat.com/automake/automake.html#Multiple-Outputs > -## Stamps used to ensure parallel make does the right thing. These -## are removed by "make clean", but otherwise unused except during the -## parallel built. These will not be included in a tarball, because -## the SWIG-generated files will be removed from the distribution. - -STAMPS += $(DEPDIR)/audio_portaudio-generate-* - ## Other cleaned files: dependency files generated by SWIG or this Makefile MOSTLYCLEANFILES += $(DEPDIR)/*.S* -## Add the .py and .cc files to the list of SWIG built sources. The -## .h file is sometimes built, but not always ... so that one has to -## be added manually by the including Makefile.am . - -# generating the py or scm file also generates the .cc or .h files, -# but dependencies work better without the .cc ort .h files listed. -# swig_built_sources += audio_portaudio.py -# if GUILE -# swig_built_sources += gnuradio/audio_portaudio.scm -# endif - ## Various SWIG variables. These can be overloaded in the including ## Makefile.am by setting the variable value there, then including ## Makefile.swig . @@ -108,8 +90,6 @@ _audio_portaudio_la_LIBADD = \ $(STD_SWIG_LA_LIB_ADD) \ $(audio_portaudio_la_swig_libadd) -# _audio_portaudio_la_DEPENDENCIES = python/audio_portaudio.lo - _audio_portaudio_la_LDFLAGS = \ $(STD_SWIG_LA_LD_FLAGS) \ $(audio_portaudio_la_swig_ldflags) @@ -123,14 +103,20 @@ audio_portaudio_python_PYTHON = \ audio_portaudio.py \ $(audio_portaudio) +python/audio_portaudio.cc: audio_portaudio.py +audio_portaudio.py: audio_portaudio.i + +# Include the python dependencies for this file +-include python/audio_portaudio.d +# end of PYTHON + if GUILE audio_portaudio_scmlib_LTLIBRARIES = libguile-audio_portaudio.la -libguile_audio_portaudio_la_SOURCES = \ +libguile_audio_portaudio_la_SOURCES = \ guile/audio_portaudio.cc \ $(audio_portaudio_la_swig_sources) nobase_audio_portaudio_scm_DATA = gnuradio/audio_portaudio.scm gnuradio/audio_portaudio-primitive.scm -# Guile can use the same flags as python does libguile_audio_portaudio_la_LIBADD = $(_audio_portaudio_la_LIBADD) libguile_audio_portaudio_la_LDFLAGS = $(_audio_portaudio_la_LDFLAGS) libguile_audio_portaudio_la_CXXFLAGS = $(_audio_portaudio_la_CXXFLAGS) @@ -139,12 +125,9 @@ guile/audio_portaudio.cc: gnuradio/audio_portaudio.scm gnuradio/audio_portaudio.scm: audio_portaudio.i gnuradio/audio_portaudio-primitive.scm: gnuradio/audio_portaudio.scm +# Include the guile dependencies for this file -include guile/audio_portaudio.d endif # end of GUILE -audio_portaudio.lo: audio_portaudio.py audio_portaudio.scm -audio_portaudio.py: audio_portaudio.i - --include python/audio_portaudio.d -- cgit From 8180bb1d7020e07c9b0a217820c68d07f0d98a74 Mon Sep 17 00:00:00 2001 From: Eric Blossom Date: Tue, 16 Nov 2010 21:33:50 -0800 Subject: regenerated --- gr-audio-portaudio/src/Makefile.swig.gen | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gr-audio-portaudio/src') diff --git a/gr-audio-portaudio/src/Makefile.swig.gen b/gr-audio-portaudio/src/Makefile.swig.gen index e7817c1e1..2ae383ed9 100644 --- a/gr-audio-portaudio/src/Makefile.swig.gen +++ b/gr-audio-portaudio/src/Makefile.swig.gen @@ -101,7 +101,7 @@ _audio_portaudio_la_CXXFLAGS = \ audio_portaudio_python_PYTHON = \ audio_portaudio.py \ - $(audio_portaudio) + $(audio_portaudio_python) python/audio_portaudio.cc: audio_portaudio.py audio_portaudio.py: audio_portaudio.i -- cgit From ff877cabe2384dc2155ef5af92ee8b959fd29806 Mon Sep 17 00:00:00 2001 From: Rob Savoye Date: Fri, 19 Nov 2010 08:07:52 -0700 Subject: regenerated --- gr-audio-portaudio/src/Makefile.swig.gen | 34 +++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) (limited to 'gr-audio-portaudio/src') diff --git a/gr-audio-portaudio/src/Makefile.swig.gen b/gr-audio-portaudio/src/Makefile.swig.gen index 2ae383ed9..bc51844dd 100644 --- a/gr-audio-portaudio/src/Makefile.swig.gen +++ b/gr-audio-portaudio/src/Makefile.swig.gen @@ -79,6 +79,7 @@ audio_portaudio_swiginclude_HEADERS = \ audio_portaudio.i \ $(audio_portaudio_swiginclude_headers) +if PYTHON audio_portaudio_pylib_LTLIBRARIES = \ _audio_portaudio.la @@ -86,6 +87,10 @@ _audio_portaudio_la_SOURCES = \ python/audio_portaudio.cc \ $(audio_portaudio_la_swig_sources) +audio_portaudio_python_PYTHON = \ + audio_portaudio.py \ + $(audio_portaudio_python) + _audio_portaudio_la_LIBADD = \ $(STD_SWIG_LA_LIB_ADD) \ $(audio_portaudio_la_swig_libadd) @@ -99,27 +104,34 @@ _audio_portaudio_la_CXXFLAGS = \ -I$(top_builddir) \ $(audio_portaudio_la_swig_cxxflags) -audio_portaudio_python_PYTHON = \ - audio_portaudio.py \ - $(audio_portaudio_python) - python/audio_portaudio.cc: audio_portaudio.py audio_portaudio.py: audio_portaudio.i # Include the python dependencies for this file -include python/audio_portaudio.d -# end of PYTHON + +endif # end of if python if GUILE -audio_portaudio_scmlib_LTLIBRARIES = libguile-audio_portaudio.la + +audio_portaudio_scmlib_LTLIBRARIES = \ + libguile-audio_portaudio.la libguile_audio_portaudio_la_SOURCES = \ guile/audio_portaudio.cc \ $(audio_portaudio_la_swig_sources) -nobase_audio_portaudio_scm_DATA = gnuradio/audio_portaudio.scm gnuradio/audio_portaudio-primitive.scm - -libguile_audio_portaudio_la_LIBADD = $(_audio_portaudio_la_LIBADD) -libguile_audio_portaudio_la_LDFLAGS = $(_audio_portaudio_la_LDFLAGS) -libguile_audio_portaudio_la_CXXFLAGS = $(_audio_portaudio_la_CXXFLAGS) +nobase_audio_portaudio_scm_DATA = \ + gnuradio/audio_portaudio.scm \ + gnuradio/audio_portaudio-primitive.scm +libguile_audio_portaudio_la_LIBADD = \ + $(STD_SWIG_LA_LIB_ADD) \ + $(audio_portaudio_la_swig_libadd) +libguile_audio_portaudio_la_LDFLAGS = \ + $(STD_SWIG_LA_LD_FLAGS) \ + $(audio_portaudio_la_swig_ldflags) +libguile_audio_portaudio_la_CXXFLAGS = \ + $(STD_SWIG_CXX_FLAGS) \ + -I$(top_builddir) \ + $(audio_portaudio_la_swig_cxxflags) guile/audio_portaudio.cc: gnuradio/audio_portaudio.scm gnuradio/audio_portaudio.scm: audio_portaudio.i -- cgit From 99dc38c8f81fe388b13bf46e3f53cc272765249e Mon Sep 17 00:00:00 2001 From: Eric Blossom Date: Wed, 24 Nov 2010 13:49:59 -0800 Subject: Consistently use TESTS += in conditionals --- gr-audio-portaudio/src/Makefile.am | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gr-audio-portaudio/src') diff --git a/gr-audio-portaudio/src/Makefile.am b/gr-audio-portaudio/src/Makefile.am index 4fa098dcc..2bf401060 100644 --- a/gr-audio-portaudio/src/Makefile.am +++ b/gr-audio-portaudio/src/Makefile.am @@ -21,6 +21,7 @@ include $(top_srcdir)/Makefile.common +TESTS = EXTRA_DIST = run_tests.in AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) \ @@ -54,7 +55,7 @@ libgnuradio_audio_portaudio_la_LDFLAGS = $(NO_UNDEFINED) $(LTVERSIONFLAGS) if PYTHON ################################### # SWIG Python interface and library -TESTS = run_tests +TESTS += run_tests DISTCLEANFILES = run_tests TOP_SWIG_IFILES = \ -- cgit From d692a41f98e7b888c745efbb9fcbbb0400f39025 Mon Sep 17 00:00:00 2001 From: Eric Blossom Date: Wed, 24 Nov 2010 17:29:11 -0800 Subject: Major Makefile.am housecleaning. Passes distcheck. Move all occurrences of swig_built_sources out of Makefile.am's. Move all SWIG related use of BUILT_SOURCES out of Makefile.am's. Clean up 'if PYTHON' conditionalization in gr-* Still left to do: fix Makefile.swig CLEANFILES and no_dist_files such that they remove exactly the generated files. --- gr-audio-portaudio/src/Makefile.am | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'gr-audio-portaudio/src') diff --git a/gr-audio-portaudio/src/Makefile.am b/gr-audio-portaudio/src/Makefile.am index 2bf401060..f8d42792b 100644 --- a/gr-audio-portaudio/src/Makefile.am +++ b/gr-audio-portaudio/src/Makefile.am @@ -1,5 +1,5 @@ # -# Copyright 2004,2008,2009 Free Software Foundation, Inc. +# Copyright 2004,2008,2009,2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -20,9 +20,11 @@ # include $(top_srcdir)/Makefile.common +include $(top_srcdir)/Makefile.swig TESTS = -EXTRA_DIST = run_tests.in +EXTRA_DIST += run_tests.in +DISTCLEANFILES += run_tests AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) \ $(PORTAUDIO_CFLAGS) $(WITH_INCLUDES) @@ -52,11 +54,8 @@ libgnuradio_audio_portaudio_la_LIBADD = \ libgnuradio_audio_portaudio_la_LDFLAGS = $(NO_UNDEFINED) $(LTVERSIONFLAGS) -if PYTHON ################################### -# SWIG Python interface and library -TESTS += run_tests -DISTCLEANFILES = run_tests +# SWIG interfaces and libraries TOP_SWIG_IFILES = \ audio_portaudio.i @@ -72,11 +71,7 @@ audio_portaudio_pythondir_category = \ audio_portaudio_la_swig_libadd = \ libgnuradio-audio-portaudio.la -include $(top_srcdir)/Makefile.swig -# add some of the variables generated inside the Makefile.swig.gen -BUILT_SOURCES = $(swig_built_sources) - -# Do not distribute the output of SWIG -no_dist_files = $(swig_built_sources) -endif +if PYTHON +TESTS += run_tests +endif \ No newline at end of file -- cgit From b005e7d9f481ed39591d97ef697621368e6505c0 Mon Sep 17 00:00:00 2001 From: Eric Blossom Date: Wed, 24 Nov 2010 19:08:21 -0800 Subject: Update .gitignore's --- gr-audio-portaudio/src/.gitignore | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gr-audio-portaudio/src') diff --git a/gr-audio-portaudio/src/.gitignore b/gr-audio-portaudio/src/.gitignore index 8c29d3577..f05e85127 100644 --- a/gr-audio-portaudio/src/.gitignore +++ b/gr-audio-portaudio/src/.gitignore @@ -15,3 +15,6 @@ /audio_portaudio.py /audio_portaudio.cc /run_tests +/gnuradio +/guile +/python -- cgit From 0b5f66113f43d2ba94a1ca741b5ce65e1f9f2c02 Mon Sep 17 00:00:00 2001 From: Eric Blossom Date: Fri, 3 Dec 2010 23:30:54 -0800 Subject: Rename libguile- to libguile-gnuradio- to match guile library naming convention. The stuff in gnuradio-core ends up with funky names, but that could be fixed by renaming gnuradio_core_filter.i -> core_filter.i etc. --- gr-audio-portaudio/src/audio_portaudio.i | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gr-audio-portaudio/src') diff --git a/gr-audio-portaudio/src/audio_portaudio.i b/gr-audio-portaudio/src/audio_portaudio.i index 65a1ef60e..7da4afead 100644 --- a/gr-audio-portaudio/src/audio_portaudio.i +++ b/gr-audio-portaudio/src/audio_portaudio.i @@ -73,7 +73,7 @@ class audio_portaudio_sink : public gr_sync_block { #if SWIGGUILE %scheme %{ -(load-extension "libguile-audio_portaudio" "scm_init_gnuradio_audio_portaudio_module") +(load-extension "libguile-gnuradio-audio_portaudio" "scm_init_gnuradio_audio_portaudio_module") %} %goops %{ -- cgit From 6df0423fe1880f5c33daa333604552ea68ac9593 Mon Sep 17 00:00:00 2001 From: Eric Blossom Date: Fri, 3 Dec 2010 23:34:24 -0800 Subject: Regenerated Makefile.swig.gen's --- gr-audio-portaudio/src/Makefile.swig.gen | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'gr-audio-portaudio/src') diff --git a/gr-audio-portaudio/src/Makefile.swig.gen b/gr-audio-portaudio/src/Makefile.swig.gen index bc51844dd..32c2e54e1 100644 --- a/gr-audio-portaudio/src/Makefile.swig.gen +++ b/gr-audio-portaudio/src/Makefile.swig.gen @@ -115,20 +115,20 @@ endif # end of if python if GUILE audio_portaudio_scmlib_LTLIBRARIES = \ - libguile-audio_portaudio.la -libguile_audio_portaudio_la_SOURCES = \ + libguile-gnuradio-audio_portaudio.la +libguile_gnuradio_audio_portaudio_la_SOURCES = \ guile/audio_portaudio.cc \ $(audio_portaudio_la_swig_sources) nobase_audio_portaudio_scm_DATA = \ gnuradio/audio_portaudio.scm \ gnuradio/audio_portaudio-primitive.scm -libguile_audio_portaudio_la_LIBADD = \ +libguile_gnuradio_audio_portaudio_la_LIBADD = \ $(STD_SWIG_LA_LIB_ADD) \ $(audio_portaudio_la_swig_libadd) -libguile_audio_portaudio_la_LDFLAGS = \ +libguile_gnuradio_audio_portaudio_la_LDFLAGS = \ $(STD_SWIG_LA_LD_FLAGS) \ $(audio_portaudio_la_swig_ldflags) -libguile_audio_portaudio_la_CXXFLAGS = \ +libguile_gnuradio_audio_portaudio_la_CXXFLAGS = \ $(STD_SWIG_CXX_FLAGS) \ -I$(top_builddir) \ $(audio_portaudio_la_swig_cxxflags) -- cgit From 1984aab345857296564e174395cf3af1375e1469 Mon Sep 17 00:00:00 2001 From: Eric Blossom Date: Fri, 10 Dec 2010 17:07:59 -0800 Subject: and another --- gr-audio-portaudio/src/audio_portaudio.i | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gr-audio-portaudio/src') diff --git a/gr-audio-portaudio/src/audio_portaudio.i b/gr-audio-portaudio/src/audio_portaudio.i index 7da4afead..612b0afff 100644 --- a/gr-audio-portaudio/src/audio_portaudio.i +++ b/gr-audio-portaudio/src/audio_portaudio.i @@ -73,7 +73,7 @@ class audio_portaudio_sink : public gr_sync_block { #if SWIGGUILE %scheme %{ -(load-extension "libguile-gnuradio-audio_portaudio" "scm_init_gnuradio_audio_portaudio_module") +(load-extension-global "libguile-gnuradio-audio_portaudio" "scm_init_gnuradio_audio_portaudio_module") %} %goops %{ -- cgit From 5748eff26f835bffedb41bd5748ccbaefbe1e02f Mon Sep 17 00:00:00 2001 From: Johnathan Corgan Date: Mon, 14 Mar 2011 10:26:56 -0700 Subject: audio: remove obsoleted individual top-level components --- gr-audio-portaudio/src/.gitignore | 20 -- gr-audio-portaudio/src/Makefile.am | 77 ----- gr-audio-portaudio/src/Makefile.swig.gen | 145 --------- gr-audio-portaudio/src/audio_portaudio.i | 82 ----- gr-audio-portaudio/src/audio_portaudio_sink.cc | 362 ---------------------- gr-audio-portaudio/src/audio_portaudio_sink.h | 105 ------- gr-audio-portaudio/src/audio_portaudio_source.cc | 374 ----------------------- gr-audio-portaudio/src/audio_portaudio_source.h | 103 ------- gr-audio-portaudio/src/gri_portaudio.cc | 111 ------- gr-audio-portaudio/src/gri_portaudio.h | 32 -- gr-audio-portaudio/src/qa_portaudio.py | 40 --- gr-audio-portaudio/src/run_tests.in | 10 - 12 files changed, 1461 deletions(-) delete mode 100644 gr-audio-portaudio/src/.gitignore delete mode 100644 gr-audio-portaudio/src/Makefile.am delete mode 100644 gr-audio-portaudio/src/Makefile.swig.gen delete mode 100644 gr-audio-portaudio/src/audio_portaudio.i delete mode 100644 gr-audio-portaudio/src/audio_portaudio_sink.cc delete mode 100644 gr-audio-portaudio/src/audio_portaudio_sink.h delete mode 100644 gr-audio-portaudio/src/audio_portaudio_source.cc delete mode 100644 gr-audio-portaudio/src/audio_portaudio_source.h delete mode 100644 gr-audio-portaudio/src/gri_portaudio.cc delete mode 100644 gr-audio-portaudio/src/gri_portaudio.h delete mode 100755 gr-audio-portaudio/src/qa_portaudio.py delete mode 100644 gr-audio-portaudio/src/run_tests.in (limited to 'gr-audio-portaudio/src') diff --git a/gr-audio-portaudio/src/.gitignore b/gr-audio-portaudio/src/.gitignore deleted file mode 100644 index f05e85127..000000000 --- a/gr-audio-portaudio/src/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -/Makefile -/Makefile.in -/.la -/.lo -/.deps -/.libs -/*.la -/*.lo -/*.pyc -/*.pyo -/usrp.py -/usrp.cc -/audio_oss.cc -/audio_oss.py -/audio_portaudio.py -/audio_portaudio.cc -/run_tests -/gnuradio -/guile -/python diff --git a/gr-audio-portaudio/src/Makefile.am b/gr-audio-portaudio/src/Makefile.am deleted file mode 100644 index f8d42792b..000000000 --- a/gr-audio-portaudio/src/Makefile.am +++ /dev/null @@ -1,77 +0,0 @@ -# -# Copyright 2004,2008,2009,2010 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common -include $(top_srcdir)/Makefile.swig - -TESTS = -EXTRA_DIST += run_tests.in -DISTCLEANFILES += run_tests - -AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) \ - $(PORTAUDIO_CFLAGS) $(WITH_INCLUDES) - -# C/C++ headers get installed in ${prefix}/include/gnuradio -grinclude_HEADERS = \ - audio_portaudio_sink.h \ - audio_portaudio_source.h - -noinst_HEADERS = \ - gri_portaudio.h - -noinst_PYTHON = \ - qa_portaudio.py - -lib_LTLIBRARIES = libgnuradio-audio-portaudio.la - -libgnuradio_audio_portaudio_la_SOURCES = \ - audio_portaudio_sink.cc \ - audio_portaudio_source.cc \ - gri_portaudio.cc - -libgnuradio_audio_portaudio_la_LIBADD = \ - $(GNURADIO_CORE_LA) \ - $(PORTAUDIO_LIBS) - -libgnuradio_audio_portaudio_la_LDFLAGS = $(NO_UNDEFINED) $(LTVERSIONFLAGS) - - -################################### -# SWIG interfaces and libraries - -TOP_SWIG_IFILES = \ - audio_portaudio.i - -# Install so that they end up available as: -# import gnuradio.audio_portaudio -# This ends up at: -# ${prefix}/lib/python${python_version}/site-packages/gnuradio -audio_portaudio_pythondir_category = \ - gnuradio - -# additional libraries for linking with the SWIG-generated library -audio_portaudio_la_swig_libadd = \ - libgnuradio-audio-portaudio.la - - -if PYTHON -TESTS += run_tests -endif \ No newline at end of file diff --git a/gr-audio-portaudio/src/Makefile.swig.gen b/gr-audio-portaudio/src/Makefile.swig.gen deleted file mode 100644 index 32c2e54e1..000000000 --- a/gr-audio-portaudio/src/Makefile.swig.gen +++ /dev/null @@ -1,145 +0,0 @@ -# -*- Makefile -*- -# -# Copyright 2009 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -# Makefile.swig.gen for audio_portaudio.i - -## Default install locations for these files: -## -## Default location for the Python directory is: -## ${prefix}/lib/python${python_version}/site-packages/[category]/audio_portaudio -## Default location for the Python exec directory is: -## ${exec_prefix}/lib/python${python_version}/site-packages/[category]/audio_portaudio -## -## The following can be overloaded to change the install location, but -## this has to be done in the including Makefile.am -before- -## Makefile.swig is included. - -audio_portaudio_pythondir_category ?= gnuradio/audio_portaudio -audio_portaudio_pylibdir_category ?= $(audio_portaudio_pythondir_category) -audio_portaudio_pythondir = $(pythondir)/$(audio_portaudio_pythondir_category) -audio_portaudio_pylibdir = $(pyexecdir)/$(audio_portaudio_pylibdir_category) - -# The .so libraries for the guile modules get installed whereever guile -# is installed, usually /usr/lib/guile/gnuradio/ -# FIXME: determince whether these should be installed with gnuradio. -audio_portaudio_scmlibdir = $(libdir) - -# The scm files for the guile modules get installed where ever guile -# is installed, usually /usr/share/guile/site/audio_portaudio -# FIXME: determince whether these should be installed with gnuradio. -audio_portaudio_scmdir = $(guiledir) - -## SWIG headers are always installed into the same directory. - -audio_portaudio_swigincludedir = $(swigincludedir) - -## This is a template file for a "generated" Makefile addition (in -## this case, "Makefile.swig.gen"). By including the top-level -## Makefile.swig, this file will be used to generate the SWIG -## dependencies. Assign the variable TOP_SWIG_FILES to be the list of -## SWIG .i files to generated wrappings for; there can be more than 1 -## so long as the names are unique (no sorting is done on the -## TOP_SWIG_FILES list). This file explicitly assumes that a SWIG .i -## file will generate .cc, .py, and possibly .h files -- meaning that -## all of these files will have the same base name (that provided for -## the SWIG .i file). -## -## This code is setup to ensure parallel MAKE ("-j" or "-jN") does the -## right thing. For more info, see < -## http://sources.redhat.com/automake/automake.html#Multiple-Outputs > - -## Other cleaned files: dependency files generated by SWIG or this Makefile - -MOSTLYCLEANFILES += $(DEPDIR)/*.S* - -## Various SWIG variables. These can be overloaded in the including -## Makefile.am by setting the variable value there, then including -## Makefile.swig . - -audio_portaudio_swiginclude_HEADERS = \ - audio_portaudio.i \ - $(audio_portaudio_swiginclude_headers) - -if PYTHON -audio_portaudio_pylib_LTLIBRARIES = \ - _audio_portaudio.la - -_audio_portaudio_la_SOURCES = \ - python/audio_portaudio.cc \ - $(audio_portaudio_la_swig_sources) - -audio_portaudio_python_PYTHON = \ - audio_portaudio.py \ - $(audio_portaudio_python) - -_audio_portaudio_la_LIBADD = \ - $(STD_SWIG_LA_LIB_ADD) \ - $(audio_portaudio_la_swig_libadd) - -_audio_portaudio_la_LDFLAGS = \ - $(STD_SWIG_LA_LD_FLAGS) \ - $(audio_portaudio_la_swig_ldflags) - -_audio_portaudio_la_CXXFLAGS = \ - $(STD_SWIG_CXX_FLAGS) \ - -I$(top_builddir) \ - $(audio_portaudio_la_swig_cxxflags) - -python/audio_portaudio.cc: audio_portaudio.py -audio_portaudio.py: audio_portaudio.i - -# Include the python dependencies for this file --include python/audio_portaudio.d - -endif # end of if python - -if GUILE - -audio_portaudio_scmlib_LTLIBRARIES = \ - libguile-gnuradio-audio_portaudio.la -libguile_gnuradio_audio_portaudio_la_SOURCES = \ - guile/audio_portaudio.cc \ - $(audio_portaudio_la_swig_sources) -nobase_audio_portaudio_scm_DATA = \ - gnuradio/audio_portaudio.scm \ - gnuradio/audio_portaudio-primitive.scm -libguile_gnuradio_audio_portaudio_la_LIBADD = \ - $(STD_SWIG_LA_LIB_ADD) \ - $(audio_portaudio_la_swig_libadd) -libguile_gnuradio_audio_portaudio_la_LDFLAGS = \ - $(STD_SWIG_LA_LD_FLAGS) \ - $(audio_portaudio_la_swig_ldflags) -libguile_gnuradio_audio_portaudio_la_CXXFLAGS = \ - $(STD_SWIG_CXX_FLAGS) \ - -I$(top_builddir) \ - $(audio_portaudio_la_swig_cxxflags) - -guile/audio_portaudio.cc: gnuradio/audio_portaudio.scm -gnuradio/audio_portaudio.scm: audio_portaudio.i -gnuradio/audio_portaudio-primitive.scm: gnuradio/audio_portaudio.scm - -# Include the guile dependencies for this file --include guile/audio_portaudio.d - -endif # end of GUILE - - diff --git a/gr-audio-portaudio/src/audio_portaudio.i b/gr-audio-portaudio/src/audio_portaudio.i deleted file mode 100644 index 612b0afff..000000000 --- a/gr-audio-portaudio/src/audio_portaudio.i +++ /dev/null @@ -1,82 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,2009 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -%include "gnuradio.i" // the common stuff - -%{ -#include "audio_portaudio_sink.h" -#include "audio_portaudio_source.h" -%} - -// ---------------------------------------------------------------- - -GR_SWIG_BLOCK_MAGIC(audio_portaudio,source) - -audio_portaudio_source_sptr -audio_portaudio_make_source (int sampling_rate, - const std::string dev = "", - bool ok_to_block = true - ) throw (std::runtime_error); - -class audio_portaudio_source : public gr_sync_block { - - protected: - audio_portaudio_source (int sampling_rate, - const std::string device_name, - bool ok_to_block - ) throw (std::runtime_error); - - public: - ~audio_portaudio_source (); -}; - -// ---------------------------------------------------------------- - -GR_SWIG_BLOCK_MAGIC(audio_portaudio,sink) - -audio_portaudio_sink_sptr -audio_portaudio_make_sink (int sampling_rate, - const std::string dev = "", - bool ok_to_block = true - ) throw (std::runtime_error); - -class audio_portaudio_sink : public gr_sync_block { - - protected: - audio_portaudio_sink (int sampling_rate, - const std::string device_name, - bool ok_to_block - ) throw (std::runtime_error); - - public: - ~audio_portaudio_sink (); -}; - -#if SWIGGUILE -%scheme %{ -(load-extension-global "libguile-gnuradio-audio_portaudio" "scm_init_gnuradio_audio_portaudio_module") -%} - -%goops %{ -(use-modules (gnuradio gnuradio_core_runtime)) -%} -#endif diff --git a/gr-audio-portaudio/src/audio_portaudio_sink.cc b/gr-audio-portaudio/src/audio_portaudio_sink.cc deleted file mode 100644 index 64e64ccf4..000000000 --- a/gr-audio-portaudio/src/audio_portaudio_sink.cc +++ /dev/null @@ -1,362 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2006,2010 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in he hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -//#define LOGGING 0 // define to 0 or 1 - -#define SAMPLE_FORMAT paFloat32 -typedef float sample_t; - -// Number of portaudio buffers in the ringbuffer -static const unsigned int N_BUFFERS = 4; - -static std::string -default_device_name () -{ - return gr_prefs::singleton()->get_string("audio_portaudio", "default_output_device", ""); -} - -void -audio_portaudio_sink::create_ringbuffer(void) -{ - int bufsize_samples = d_portaudio_buffer_size_frames * d_output_parameters.channelCount; - - if (d_verbose) - fprintf(stderr,"ring buffer size = %d frames\n", - N_BUFFERS*bufsize_samples/d_output_parameters.channelCount); - - // FYI, the buffer indicies are in units of samples. - d_writer = gr_make_buffer(N_BUFFERS * bufsize_samples, sizeof(sample_t)); - d_reader = gr_buffer_add_reader(d_writer, 0); -} - -/* - * This routine will be called by the PortAudio engine when audio is needed. - * It may called at interrupt level on some machines so don't do anything - * that could mess up the system like calling malloc() or free(). - * - * Our job is to write framesPerBuffer frames into outputBuffer. - */ -int -portaudio_sink_callback (const void *inputBuffer, - void *outputBuffer, - unsigned long framesPerBuffer, - const PaStreamCallbackTimeInfo* timeInfo, - PaStreamCallbackFlags statusFlags, - void *arg) -{ - audio_portaudio_sink *self = (audio_portaudio_sink *)arg; - int nreqd_samples = - framesPerBuffer * self->d_output_parameters.channelCount; - - int navail_samples = self->d_reader->items_available(); - - if (nreqd_samples <= navail_samples) { // We've got enough data... - { - gruel::scoped_lock guard(self->d_ringbuffer_mutex); - - memcpy(outputBuffer, - self->d_reader->read_pointer(), - nreqd_samples * sizeof(sample_t)); - self->d_reader->update_read_pointer(nreqd_samples); - - self->d_ringbuffer_ready = true; - } - - // Tell the sink thread there is new room in the ringbuffer. - self->d_ringbuffer_cond.notify_one(); - return paContinue; - } - - else { // underrun - self->d_nunderuns++; - ssize_t r = ::write(2, "aU", 2); // FIXME change to non-blocking call - if(r == -1) { - perror("audio_portaudio_source::portaudio_source_callback write error to stderr."); - } - - // FIXME we should transfer what we've got and pad the rest - memset(outputBuffer, 0, nreqd_samples * sizeof(sample_t)); - - self->d_ringbuffer_ready = true; - self->d_ringbuffer_cond.notify_one(); // Tell the sink to get going! - - return paContinue; - } -} - - -// ---------------------------------------------------------------- - -audio_portaudio_sink_sptr -audio_portaudio_make_sink (int sampling_rate, const std::string dev, bool ok_to_block) -{ - return gnuradio::get_initial_sptr(new audio_portaudio_sink (sampling_rate, - dev, ok_to_block)); -} - -audio_portaudio_sink::audio_portaudio_sink(int sampling_rate, - const std::string device_name, - bool ok_to_block) - : gr_sync_block ("audio_portaudio_sink", - gr_make_io_signature(0, 0, 0), - gr_make_io_signature(0, 0, 0)), - d_sampling_rate(sampling_rate), - d_device_name(device_name.empty() ? default_device_name() : device_name), - d_ok_to_block(ok_to_block), - d_verbose(gr_prefs::singleton()->get_bool("audio_portaudio", "verbose", false)), - d_portaudio_buffer_size_frames(0), - d_stream(0), - d_ringbuffer_mutex(), - d_ringbuffer_cond(), - d_ringbuffer_ready(false), - d_nunderuns(0) -{ - memset(&d_output_parameters, 0, sizeof(d_output_parameters)); - //if (LOGGING) - // d_log = gri_logger::singleton(); - - PaError err; - int i, numDevices; - PaDeviceIndex device = 0; - const PaDeviceInfo *deviceInfo = NULL; - - err = Pa_Initialize(); - if (err != paNoError) { - bail ("Initialize failed", err); - } - - if (d_verbose) - gri_print_devices(); - - numDevices = Pa_GetDeviceCount(); - if (numDevices < 0) - bail("Pa Device count failed", 0); - if (numDevices == 0) - bail("no devices available", 0); - - if (d_device_name.empty()) - { - // FIXME Get smarter about picking something - fprintf(stderr,"\nUsing Default Device\n"); - device = Pa_GetDefaultOutputDevice(); - deviceInfo = Pa_GetDeviceInfo(device); - fprintf(stderr,"%s is the chosen device using %s as the host\n", - deviceInfo->name, Pa_GetHostApiInfo(deviceInfo->hostApi)->name); - } - else - { - bool found = false; - fprintf(stderr,"\nTest Devices\n"); - for (i=0;iname); - if (deviceInfo->maxOutputChannels <= 0) { - fprintf(stderr,"\n"); - continue; - } - if (strstr(deviceInfo->name, d_device_name.c_str())){ - fprintf(stderr," Chosen!\n"); - device = i; - fprintf(stderr,"%s using %s as the host\n",d_device_name.c_str(), - Pa_GetHostApiInfo(deviceInfo->hostApi)->name), fflush(stderr); - found = true; - deviceInfo = Pa_GetDeviceInfo(device); - i = numDevices; // force loop exit - } - else - fprintf(stderr,"\n"),fflush(stderr); - } - - if (!found){ - bail("Failed to find specified device name", 0); - exit(1); - } - } - - - d_output_parameters.device = device; - d_output_parameters.channelCount = deviceInfo->maxOutputChannels; - d_output_parameters.sampleFormat = SAMPLE_FORMAT; - d_output_parameters.suggestedLatency = deviceInfo->defaultLowOutputLatency; - d_output_parameters.hostApiSpecificStreamInfo = NULL; - - // We fill in the real channelCount in check_topology when we know - // how many inputs are connected to us. - - // Now that we know the maximum number of channels (allegedly) - // supported by the h/w, we can compute a reasonable input - // signature. The portaudio specs say that they'll accept any - // number of channels from 1 to max. - set_input_signature(gr_make_io_signature(1, deviceInfo->maxOutputChannels, - sizeof (sample_t))); -} - - -bool -audio_portaudio_sink::check_topology (int ninputs, int noutputs) -{ - PaError err; - - if (Pa_IsStreamActive(d_stream)) - { - Pa_CloseStream(d_stream); - d_stream = 0; - d_reader.reset(); // boost::shared_ptr for d_reader = 0 - d_writer.reset(); // boost::shared_ptr for d_write = 0 - } - - d_output_parameters.channelCount = ninputs; // # of channels we're really using - -#if 1 - d_portaudio_buffer_size_frames = (int)(0.0213333333 * d_sampling_rate + 0.5); // Force 1024 frame buffers at 48000 - fprintf(stderr, "Latency = %8.5f, requested sampling_rate = %g\n", // Force latency to 21.3333333.. ms - 0.0213333333, (double)d_sampling_rate); -#endif - err = Pa_OpenStream(&d_stream, - NULL, // No input - &d_output_parameters, - d_sampling_rate, - d_portaudio_buffer_size_frames, - paClipOff, - &portaudio_sink_callback, - (void*)this); - - if (err != paNoError) { - output_error_msg ("OpenStream failed", err); - return false; - } - -#if 0 - const PaStreamInfo *psi = Pa_GetStreamInfo(d_stream); - - d_portaudio_buffer_size_frames = (int)(d_output_parameters.suggestedLatency * psi->sampleRate); - fprintf(stderr, "Latency = %7.4f, psi->sampleRate = %g\n", - d_output_parameters.suggestedLatency, psi->sampleRate); -#endif - - fprintf(stderr, "d_portaudio_buffer_size_frames = %d\n", d_portaudio_buffer_size_frames); - - assert(d_portaudio_buffer_size_frames != 0); - - create_ringbuffer(); - - err = Pa_StartStream(d_stream); - if (err != paNoError) { - output_error_msg ("StartStream failed", err); - return false; - } - - return true; -} - -audio_portaudio_sink::~audio_portaudio_sink () -{ - Pa_StopStream(d_stream); // wait for output to drain - Pa_CloseStream(d_stream); - Pa_Terminate(); -} - -/* - * This version consumes everything sent to it, blocking if required. - * I think this will allow us better control of the total buffering/latency - * in the audio path. - */ -int -audio_portaudio_sink::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - const float **in = (const float **) &input_items[0]; - const unsigned nchan = d_output_parameters.channelCount; // # of channels == samples/frame - - int k; - - for (k = 0; k < noutput_items; ){ - int nframes = d_writer->space_available() / nchan; // How much space in ringbuffer - if (nframes == 0){ // no room... - if (d_ok_to_block){ - { - gruel::scoped_lock guard(d_ringbuffer_mutex); - while (!d_ringbuffer_ready) - d_ringbuffer_cond.wait(guard); - } - - continue; - } - else { - // There's no room and we're not allowed to block. - // (A USRP is most likely controlling the pacing through the pipeline.) - // We drop the samples on the ground, and say we processed them all ;) - // - // FIXME, there's probably room for a bit more finesse here. - return noutput_items; - } - } - - // We can write the smaller of the request and the room we've got - { - gruel::scoped_lock guard(d_ringbuffer_mutex); - - int nf = std::min(noutput_items - k, nframes); - float *p = (float *) d_writer->write_pointer(); - - for (int i = 0; i < nf; i++) - for (unsigned int c = 0; c < nchan; c++) - *p++ = in[c][k + i]; - - d_writer->update_write_pointer(nf * nchan); - k += nf; - - d_ringbuffer_ready = false; - } - } - - return k; // tell how many we actually did -} - -void -audio_portaudio_sink::output_error_msg (const char *msg, int err) -{ - fprintf (stderr, "audio_portaudio_sink[%s]: %s: %s\n", - d_device_name.c_str (), msg, Pa_GetErrorText(err)); -} - -void -audio_portaudio_sink::bail (const char *msg, int err) throw (std::runtime_error) -{ - output_error_msg (msg, err); - throw std::runtime_error ("audio_portaudio_sink"); -} diff --git a/gr-audio-portaudio/src/audio_portaudio_sink.h b/gr-audio-portaudio/src/audio_portaudio_sink.h deleted file mode 100644 index 71cbfcf9f..000000000 --- a/gr-audio-portaudio/src/audio_portaudio_sink.h +++ /dev/null @@ -1,105 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2006 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ -#ifndef INCLUDED_AUDIO_PORTAUDIO_SINK_H -#define INCLUDED_AUDIO_PORTAUDIO_SINK_H - -#include -#include -#include -#include -#include -#include -//#include - -class audio_portaudio_sink; -typedef boost::shared_ptr audio_portaudio_sink_sptr; - -/*! - * \brief PORTAUDIO audio sink. - * - * \param sampling_rate sampling rate in Hz - * \param device_name PORTAUDIO device name, e.g., "pa:" - * \param ok_to_block true if it's ok for us to block - */ -audio_portaudio_sink_sptr -audio_portaudio_make_sink (int sampling_rate, - const std::string device_name = "", - bool ok_to_block = true); - -PaStreamCallback portaudio_sink_callback; - - -/*! - * \ Audio sink using PORTAUDIO - * - * Input samples must be in the range [-1,1]. - */ -class audio_portaudio_sink : public gr_sync_block { - friend audio_portaudio_sink_sptr - audio_portaudio_make_sink (int sampling_rate, - const std::string device_name, - bool ok_to_block); - - friend PaStreamCallback portaudio_sink_callback; - - - unsigned int d_sampling_rate; - std::string d_device_name; - bool d_ok_to_block; - bool d_verbose; - - unsigned int d_portaudio_buffer_size_frames; // number of frames in a portaudio buffer - - PaStream *d_stream; - PaStreamParameters d_output_parameters; - - gr_buffer_sptr d_writer; // buffer used between work and callback - gr_buffer_reader_sptr d_reader; - - gruel::mutex d_ringbuffer_mutex; - gruel::condition_variable d_ringbuffer_cond; - bool d_ringbuffer_ready; - - // random stats - int d_nunderuns; // count of underruns - //gri_logger_sptr d_log; // handle to non-blocking logging instance - - void output_error_msg (const char *msg, int err); - void bail (const char *msg, int err) throw (std::runtime_error); - void create_ringbuffer(); - - - protected: - audio_portaudio_sink (int sampling_rate, const std::string device_name, - bool ok_to_block); - - public: - ~audio_portaudio_sink (); - - bool check_topology (int ninputs, int noutputs); - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif /* INCLUDED_AUDIO_PORTAUDIO_SINK_H */ diff --git a/gr-audio-portaudio/src/audio_portaudio_source.cc b/gr-audio-portaudio/src/audio_portaudio_source.cc deleted file mode 100644 index e508fda22..000000000 --- a/gr-audio-portaudio/src/audio_portaudio_source.cc +++ /dev/null @@ -1,374 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2006,2010 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in he hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -//#define LOGGING 0 // define to 0 or 1 - -#define SAMPLE_FORMAT paFloat32 -typedef float sample_t; - -// Number of portaudio buffers in the ringbuffer -static const unsigned int N_BUFFERS = 4; - -static std::string -default_device_name () -{ - return gr_prefs::singleton()->get_string("audio_portaudio", "default_input_device", ""); -} - -void -audio_portaudio_source::create_ringbuffer(void) -{ - int bufsize_samples = d_portaudio_buffer_size_frames * d_input_parameters.channelCount; - - if (d_verbose) - fprintf(stderr, "ring buffer size = %d frames\n", - N_BUFFERS*bufsize_samples/d_input_parameters.channelCount); - - // FYI, the buffer indicies are in units of samples. - d_writer = gr_make_buffer(N_BUFFERS * bufsize_samples, sizeof(sample_t)); - d_reader = gr_buffer_add_reader(d_writer, 0); -} - -/* - * This routine will be called by the PortAudio engine when audio is needed. - * It may called at interrupt level on some machines so don't do anything - * that could mess up the system like calling malloc() or free(). - * - * Our job is to copy framesPerBuffer frames from inputBuffer. - */ -int -portaudio_source_callback (const void *inputBuffer, - void *outputBuffer, - unsigned long framesPerBuffer, - const PaStreamCallbackTimeInfo* timeInfo, - PaStreamCallbackFlags statusFlags, - void *arg) -{ - audio_portaudio_source *self = (audio_portaudio_source *)arg; - int nchan = self->d_input_parameters.channelCount; - int nframes_to_copy = framesPerBuffer; - int nframes_room = self->d_writer->space_available() / nchan; - - if (nframes_to_copy <= nframes_room){ // We've got room for the data .. - //if (LOGGING) - // self->d_log->printf("PAsrc cb: f/b = %4ld\n", framesPerBuffer); - - // copy from input buffer to ringbuffer - { - gruel::scoped_lock(d_ringbuffer_mutex); - - memcpy(self->d_writer->write_pointer(), - inputBuffer, - nframes_to_copy * nchan * sizeof(sample_t)); - self->d_writer->update_write_pointer(nframes_to_copy * nchan); - - // Tell the source thread there is new data in the ringbuffer. - self->d_ringbuffer_ready = true; - } - - self->d_ringbuffer_cond.notify_one(); - return paContinue; - } - - else { // overrun - self->d_noverruns++; - ssize_t r = ::write(2, "aO", 2); // FIXME change to non-blocking call - if(r == -1) { - perror("audio_portaudio_source::portaudio_source_callback write error to stderr."); - } - - self->d_ringbuffer_ready = false; - self->d_ringbuffer_cond.notify_one(); // Tell the sink to get going! - return paContinue; - } -} - - -// ---------------------------------------------------------------- - -audio_portaudio_source_sptr -audio_portaudio_make_source (int sampling_rate, const std::string dev, bool ok_to_block) -{ - return gnuradio::get_initial_sptr(new audio_portaudio_source (sampling_rate, - dev, ok_to_block)); -} - -audio_portaudio_source::audio_portaudio_source(int sampling_rate, - const std::string device_name, - bool ok_to_block) - : gr_sync_block ("audio_portaudio_source", - gr_make_io_signature(0, 0, 0), - gr_make_io_signature(0, 0, 0)), - d_sampling_rate(sampling_rate), - d_device_name(device_name.empty() ? default_device_name() : device_name), - d_ok_to_block(ok_to_block), - d_verbose(gr_prefs::singleton()->get_bool("audio_portaudio", "verbose", false)), - d_portaudio_buffer_size_frames(0), - d_stream(0), - d_ringbuffer_mutex(), - d_ringbuffer_cond(), - d_ringbuffer_ready(false), - d_noverruns(0) -{ - memset(&d_input_parameters, 0, sizeof(d_input_parameters)); - //if (LOGGING) - // d_log = gri_logger::singleton(); - - PaError err; - int i, numDevices; - PaDeviceIndex device = 0; - const PaDeviceInfo *deviceInfo = NULL; - - - err = Pa_Initialize(); - if (err != paNoError) { - bail ("Initialize failed", err); - } - - if (d_verbose) - gri_print_devices(); - - numDevices = Pa_GetDeviceCount(); - if (numDevices < 0) - bail("Pa Device count failed", 0); - if (numDevices == 0) - bail("no devices available", 0); - - if (d_device_name.empty()) - { - // FIXME Get smarter about picking something - device = Pa_GetDefaultInputDevice(); - deviceInfo = Pa_GetDeviceInfo(device); - fprintf(stderr,"%s is the chosen device using %s as the host\n", - deviceInfo->name, Pa_GetHostApiInfo(deviceInfo->hostApi)->name); - } - else - { - bool found = false; - - for (i=0;iname); - if (deviceInfo->maxInputChannels <= 0) { - fprintf(stderr,"\n"); - continue; - } - if (strstr(deviceInfo->name, d_device_name.c_str())){ - fprintf(stderr," Chosen!\n"); - device = i; - fprintf(stderr,"%s using %s as the host\n",d_device_name.c_str(), - Pa_GetHostApiInfo(deviceInfo->hostApi)->name), fflush(stderr); - found = true; - deviceInfo = Pa_GetDeviceInfo(device); - i = numDevices; // force loop exit - } - else - fprintf(stderr,"\n"),fflush(stderr); - } - - if (!found){ - bail("Failed to find specified device name", 0); - } - } - - - d_input_parameters.device = device; - d_input_parameters.channelCount = deviceInfo->maxInputChannels; - d_input_parameters.sampleFormat = SAMPLE_FORMAT; - d_input_parameters.suggestedLatency = deviceInfo->defaultLowInputLatency; - d_input_parameters.hostApiSpecificStreamInfo = NULL; - - // We fill in the real channelCount in check_topology when we know - // how many inputs are connected to us. - - // Now that we know the maximum number of channels (allegedly) - // supported by the h/w, we can compute a reasonable output - // signature. The portaudio specs say that they'll accept any - // number of channels from 1 to max. - set_output_signature(gr_make_io_signature(1, deviceInfo->maxInputChannels, - sizeof (sample_t))); -} - - -bool -audio_portaudio_source::check_topology (int ninputs, int noutputs) -{ - PaError err; - - if (Pa_IsStreamActive(d_stream)) - { - Pa_CloseStream(d_stream); - d_stream = 0; - d_reader.reset(); // boost::shared_ptr for d_reader = 0 - d_writer.reset(); // boost::shared_ptr for d_write = 0 - } - - d_input_parameters.channelCount = noutputs; // # of channels we're really using - -#if 1 - d_portaudio_buffer_size_frames = (int)(0.0213333333 * d_sampling_rate + 0.5); // Force 512 frame buffers at 48000 - fprintf(stderr, "Latency = %8.5f, requested sampling_rate = %g\n", // Force latency to 21.3333333.. ms - 0.0213333333, (double)d_sampling_rate); -#endif - err = Pa_OpenStream(&d_stream, - &d_input_parameters, - NULL, // No output - d_sampling_rate, - d_portaudio_buffer_size_frames, - paClipOff, - &portaudio_source_callback, - (void*)this); - - if (err != paNoError) { - output_error_msg ("OpenStream failed", err); - return false; - } - -#if 0 - const PaStreamInfo *psi = Pa_GetStreamInfo(d_stream); - - d_portaudio_buffer_size_frames = (int)(d_input_parameters.suggestedLatency * psi->sampleRate); - fprintf(stderr, "Latency = %7.4f, psi->sampleRate = %g\n", - d_input_parameters.suggestedLatency, psi->sampleRate); -#endif - - fprintf(stderr, "d_portaudio_buffer_size_frames = %d\n", d_portaudio_buffer_size_frames); - - assert(d_portaudio_buffer_size_frames != 0); - - create_ringbuffer(); - - err = Pa_StartStream(d_stream); - if (err != paNoError) { - output_error_msg ("StartStream failed", err); - return false; - } - - return true; -} - -audio_portaudio_source::~audio_portaudio_source () -{ - Pa_StopStream(d_stream); // wait for output to drain - Pa_CloseStream(d_stream); - Pa_Terminate(); -} - -int -audio_portaudio_source::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - float **out = (float **) &output_items[0]; - const unsigned nchan = d_input_parameters.channelCount; // # of channels == samples/frame - - int k; - for (k = 0; k < noutput_items; ){ - - int nframes = d_reader->items_available() / nchan; // # of frames in ringbuffer - if (nframes == 0){ // no data right now... - if (k > 0) // If we've produced anything so far, return that - return k; - - if (d_ok_to_block) { - gruel:: scoped_lock guard(d_ringbuffer_mutex); - while (d_ringbuffer_ready == false) - d_ringbuffer_cond.wait(guard); // block here, then try again - continue; - } - - assert(k == 0); - - // There's no data and we're not allowed to block. - // (A USRP is most likely controlling the pacing through the pipeline.) - // This is an underun. The scheduler wouldn't have called us if it - // had anything better to do. Thus we really need to produce some amount - // of "fill". - // - // There are lots of options for comfort noise, etc. - // FIXME We'll fill with zeros for now. Yes, it will "click"... - - // Fill with some frames of zeros - { - gruel::scoped_lock guard(d_ringbuffer_mutex); - - int nf = std::min(noutput_items - k, (int) d_portaudio_buffer_size_frames); - for (int i = 0; i < nf; i++){ - for (unsigned int c = 0; c < nchan; c++){ - out[c][k + i] = 0; - } - } - k += nf; - - d_ringbuffer_ready = false; - return k; - } - } - - // We can read the smaller of the request and what's in the buffer. - { - gruel::scoped_lock guard(d_ringbuffer_mutex); - - int nf = std::min(noutput_items - k, nframes); - - const float *p = (const float *) d_reader->read_pointer(); - for (int i = 0; i < nf; i++){ - for (unsigned int c = 0; c < nchan; c++){ - out[c][k + i] = *p++; - } - } - d_reader->update_read_pointer(nf * nchan); - k += nf; - d_ringbuffer_ready = false; - } - } - - return k; // tell how many we actually did -} - -void -audio_portaudio_source::output_error_msg (const char *msg, int err) -{ - fprintf (stderr, "audio_portaudio_source[%s]: %s: %s\n", - d_device_name.c_str (), msg, Pa_GetErrorText(err)); -} - -void -audio_portaudio_source::bail (const char *msg, int err) throw (std::runtime_error) -{ - output_error_msg (msg, err); - throw std::runtime_error ("audio_portaudio_source"); -} diff --git a/gr-audio-portaudio/src/audio_portaudio_source.h b/gr-audio-portaudio/src/audio_portaudio_source.h deleted file mode 100644 index 31e70a127..000000000 --- a/gr-audio-portaudio/src/audio_portaudio_source.h +++ /dev/null @@ -1,103 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2006.2010 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ -#ifndef INCLUDED_AUDIO_PORTAUDIO_SOURCE_H -#define INCLUDED_AUDIO_PORTAUDIO_SOURCE_H - -#include -#include -#include -#include -#include -#include - -class audio_portaudio_source; -typedef boost::shared_ptr audio_portaudio_source_sptr; - -/*! - * \brief PORTAUDIO audio source. - * - * \param sampling_rate sampling rate in Hz - * \param device_name PORTAUDIO device name, e.g., "pa:" - * \param ok_to_block true if it's ok for us to block - */ -audio_portaudio_source_sptr -audio_portaudio_make_source (int sampling_rate, - const std::string device_name = "", - bool ok_to_block = true); - -PaStreamCallback portaudio_source_callback; - - -/*! - * \ Audio source using PORTAUDIO - * - * Input samples must be in the range [-1,1]. - */ -class audio_portaudio_source : public gr_sync_block { - friend audio_portaudio_source_sptr - audio_portaudio_make_source (int sampling_rate, - const std::string device_name, - bool ok_to_block); - - friend PaStreamCallback portaudio_source_callback; - - - unsigned int d_sampling_rate; - std::string d_device_name; - bool d_ok_to_block; - bool d_verbose; - - unsigned int d_portaudio_buffer_size_frames; // number of frames in a portaudio buffer - - PaStream *d_stream; - PaStreamParameters d_input_parameters; - - gr_buffer_sptr d_writer; // buffer used between work and callback - gr_buffer_reader_sptr d_reader; - - gruel::mutex d_ringbuffer_mutex; - gruel::condition_variable d_ringbuffer_cond; - bool d_ringbuffer_ready; - - // random stats - int d_noverruns; // count of overruns - - void output_error_msg (const char *msg, int err); - void bail (const char *msg, int err) throw (std::runtime_error); - void create_ringbuffer(); - - - protected: - audio_portaudio_source (int sampling_rate, const std::string device_name, - bool ok_to_block); - - public: - ~audio_portaudio_source (); - - bool check_topology (int ninputs, int noutputs); - - int work (int ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif /* INCLUDED_AUDIO_PORTAUDIO_SOURCE_H */ diff --git a/gr-audio-portaudio/src/gri_portaudio.cc b/gr-audio-portaudio/src/gri_portaudio.cc deleted file mode 100644 index faa472337..000000000 --- a/gr-audio-portaudio/src/gri_portaudio.cc +++ /dev/null @@ -1,111 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2006 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include - - -PaDeviceIndex -gri_pa_find_device_by_name(const char *name) -{ - int i; - int numDevices; - const PaDeviceInfo *pdi; - int len = strlen( name ); - PaDeviceIndex result = paNoDevice; - numDevices = Pa_GetDeviceCount(); - for( i=0; iname, len ) == 0 ) - { - result = i; - break; - } - } - return result; -} - - -void -gri_print_devices() -{ - int numDevices, defaultDisplayed, myDevice=0; - const PaDeviceInfo *deviceInfo; - - numDevices = Pa_GetDeviceCount(); - if (numDevices < 0) - return; - - printf("Number of devices found = %d\n", numDevices); - - for (int i=0; i < numDevices; i++ ) { - deviceInfo = Pa_GetDeviceInfo( i ); - printf( "--------------------------------------- device #%d\n", i ); - /* Mark global and API specific default devices */ - defaultDisplayed = 0; - if( i == Pa_GetDefaultInputDevice() ) - { - myDevice = i; - printf( "[ Default Input" ); - defaultDisplayed = 1; - } - else if( i == Pa_GetHostApiInfo( deviceInfo->hostApi )->defaultInputDevice ) - { - const PaHostApiInfo *hostInfo = Pa_GetHostApiInfo( deviceInfo->hostApi ); - printf( "[ Default %s Input", hostInfo->name ); - defaultDisplayed = 1; - } - - if( i == Pa_GetDefaultOutputDevice() ) - { - printf( (defaultDisplayed ? "," : "[") ); - printf( " Default Output" ); - defaultDisplayed = 1; - } - else if( i == Pa_GetHostApiInfo( deviceInfo->hostApi )->defaultOutputDevice ) - { - const PaHostApiInfo *hostInfo = Pa_GetHostApiInfo( deviceInfo->hostApi ); - printf( (defaultDisplayed ? "," : "[") ); - printf( " Default %s Output", hostInfo->name ); - defaultDisplayed = 1; - } - if( defaultDisplayed ) - printf( " ]\n" ); - - /* print device info fields */ - printf( "Name = %s\n", deviceInfo->name ); - printf( "Host API = %s\n", Pa_GetHostApiInfo( deviceInfo->hostApi )->name ); - printf( "Max inputs = %d", deviceInfo->maxInputChannels ); - printf( ", Max outputs = %d\n", deviceInfo->maxOutputChannels ); - - printf( "Default low input latency = %8.3f\n", deviceInfo->defaultLowInputLatency ); - printf( "Default low output latency = %8.3f\n", deviceInfo->defaultLowOutputLatency ); - printf( "Default high input latency = %8.3f\n", deviceInfo->defaultHighInputLatency ); - printf( "Default high output latency = %8.3f\n", deviceInfo->defaultHighOutputLatency ); - } -} diff --git a/gr-audio-portaudio/src/gri_portaudio.h b/gr-audio-portaudio/src/gri_portaudio.h deleted file mode 100644 index 36191e25a..000000000 --- a/gr-audio-portaudio/src/gri_portaudio.h +++ /dev/null @@ -1,32 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2006 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -#ifndef INCLUDED_GRI_PORTAUDIO_H -#define INCLUDED_GRI_PORTAUDIO_H - -#include -#include - -PaDeviceIndex gri_pa_find_device_by_name(const char *name); -void gri_print_devices(); - -#endif /* INCLUDED_GRI_PORTAUDIO_H */ diff --git a/gr-audio-portaudio/src/qa_portaudio.py b/gr-audio-portaudio/src/qa_portaudio.py deleted file mode 100755 index 20731f38d..000000000 --- a/gr-audio-portaudio/src/qa_portaudio.py +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2005,2010 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -from gnuradio import gr, gr_unittest -import audio_portaudio - -class test_audio_portaudio (gr_unittest.TestCase): - - def setUp (self): - self.tb = gr.top_block () - - def tearDown (self): - self.tb = None - - def test_000_nop (self): - """Just see if we can import the module... - They may not have PORTAUDIO drivers, etc. Don't try to run anything""" - pass - -if __name__ == '__main__': - gr_unittest.run(test_audio_portaudio, "test_audio_portaudio.xml") diff --git a/gr-audio-portaudio/src/run_tests.in b/gr-audio-portaudio/src/run_tests.in deleted file mode 100644 index 0b483dbcf..000000000 --- a/gr-audio-portaudio/src/run_tests.in +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -# 1st parameter is absolute path to component source directory -# 2nd parameter is absolute path to component build directory -# 3rd parameter is path to Python QA directory - -@top_builddir@/run_tests.sh \ - @abs_top_srcdir@/gr-audio-portaudio \ - @abs_top_builddir@/gr-audio-portaudio \ - @srcdir@ -- cgit