From 8adfb3bd99b4dcff2459756af090a640fd7a4b4a Mon Sep 17 00:00:00 2001 From: yo mama Date: Fri, 19 Jun 2015 16:24:27 -0400 Subject: clone --- pysoundtouch/soundtouch/source/Makefile | 631 ++++++++++++ pysoundtouch/soundtouch/source/Makefile.am | 28 + pysoundtouch/soundtouch/source/Makefile.in | 631 ++++++++++++ .../.deps/soundstretch-RunParameters.Po | 249 +++++ .../SoundStretch/.deps/soundstretch-WavFile.Po | 256 +++++ .../source/SoundStretch/.deps/soundstretch-main.Po | 279 ++++++ .../soundtouch/source/SoundStretch/Makefile | 700 +++++++++++++ .../soundtouch/source/SoundStretch/Makefile.am | 53 + .../soundtouch/source/SoundStretch/Makefile.in | 700 +++++++++++++ .../source/SoundStretch/RunParameters.cpp | 302 ++++++ .../soundtouch/source/SoundStretch/RunParameters.h | 72 ++ .../soundtouch/source/SoundStretch/WavFile.cpp | 745 ++++++++++++++ .../soundtouch/source/SoundStretch/WavFile.h | 250 +++++ .../soundtouch/source/SoundStretch/main.cpp | 330 +++++++ .../soundtouch/source/SoundStretch/soundstretch | Bin 0 -> 71200 bytes .../source/SoundStretch/soundstretch.dsp | 137 +++ .../source/SoundStretch/soundstretch.dsw | 44 + .../source/SoundStretch/soundstretch.sln | 32 + .../source/SoundStretch/soundstretch.vcproj | 233 +++++ .../source/SoundTouch/.deps/AAFilter.Plo | 109 ++ .../source/SoundTouch/.deps/BPMDetect.Plo | 135 +++ .../source/SoundTouch/.deps/FIFOSampleBuffer.Plo | 256 +++++ .../source/SoundTouch/.deps/FIRFilter.Plo | 277 ++++++ .../source/SoundTouch/.deps/PeakFinder.Plo | 71 ++ .../source/SoundTouch/.deps/RateTransposer.Plo | 277 ++++++ .../source/SoundTouch/.deps/SoundTouch.Plo | 307 ++++++ .../source/SoundTouch/.deps/TDStretch.Plo | 327 ++++++ .../source/SoundTouch/.deps/cpu_detect_x86_gcc.Plo | 233 +++++ .../source/SoundTouch/.deps/mmx_optimized.Plo | 8 + .../source/SoundTouch/.deps/sse_optimized.Plo | 10 + .../soundtouch/source/SoundTouch/3dnow_win.cpp | 349 +++++++ .../soundtouch/source/SoundTouch/AAFilter.cpp | 184 ++++ .../soundtouch/source/SoundTouch/AAFilter.h | 91 ++ .../soundtouch/source/SoundTouch/BPMDetect.cpp | 311 ++++++ .../source/SoundTouch/FIFOSampleBuffer.cpp | 262 +++++ .../soundtouch/source/SoundTouch/FIRFilter.cpp | 269 +++++ .../soundtouch/source/SoundTouch/FIRFilter.h | 164 +++ pysoundtouch/soundtouch/source/SoundTouch/Makefile | 683 +++++++++++++ .../soundtouch/source/SoundTouch/Makefile.am | 46 + .../soundtouch/source/SoundTouch/Makefile.in | 683 +++++++++++++ .../soundtouch/source/SoundTouch/PeakFinder.cpp | 242 +++++ .../soundtouch/source/SoundTouch/PeakFinder.h | 94 ++ .../source/SoundTouch/RateTransposer.cpp | 628 ++++++++++++ .../soundtouch/source/SoundTouch/RateTransposer.h | 159 +++ .../soundtouch/source/SoundTouch/SoundTouch.cpp | 480 +++++++++ .../soundtouch/source/SoundTouch/SoundTouch.dsp | 188 ++++ .../soundtouch/source/SoundTouch/SoundTouch.dsw | 31 + .../soundtouch/source/SoundTouch/SoundTouch.sln | 21 + .../soundtouch/source/SoundTouch/SoundTouch.vcproj | 353 +++++++ .../soundtouch/source/SoundTouch/TDStretch.cpp | 1045 ++++++++++++++++++++ .../soundtouch/source/SoundTouch/TDStretch.h | 275 ++++++ .../soundtouch/source/SoundTouch/cpu_detect.h | 62 ++ .../source/SoundTouch/cpu_detect_x86_gcc.cpp | 135 +++ .../source/SoundTouch/cpu_detect_x86_win.cpp | 129 +++ .../soundtouch/source/SoundTouch/mmx_optimized.cpp | 320 ++++++ .../soundtouch/source/SoundTouch/sse_optimized.cpp | 510 ++++++++++ .../source/SoundTouchDLL/SoundTouchDLL.cpp | 327 ++++++ .../source/SoundTouchDLL/SoundTouchDLL.h | 164 +++ .../source/SoundTouchDLL/SoundTouchDLL.pas | 469 +++++++++ .../source/SoundTouchDLL/SoundTouchDLL.rc | 113 +++ .../source/SoundTouchDLL/SoundTouchDLL.sln | 32 + .../source/SoundTouchDLL/SoundTouchDLL.vcproj | 158 +++ 62 files changed, 16659 insertions(+) create mode 100644 pysoundtouch/soundtouch/source/Makefile create mode 100644 pysoundtouch/soundtouch/source/Makefile.am create mode 100644 pysoundtouch/soundtouch/source/Makefile.in create mode 100644 pysoundtouch/soundtouch/source/SoundStretch/.deps/soundstretch-RunParameters.Po create mode 100644 pysoundtouch/soundtouch/source/SoundStretch/.deps/soundstretch-WavFile.Po create mode 100644 pysoundtouch/soundtouch/source/SoundStretch/.deps/soundstretch-main.Po create mode 100644 pysoundtouch/soundtouch/source/SoundStretch/Makefile create mode 100644 pysoundtouch/soundtouch/source/SoundStretch/Makefile.am create mode 100644 pysoundtouch/soundtouch/source/SoundStretch/Makefile.in create mode 100644 pysoundtouch/soundtouch/source/SoundStretch/RunParameters.cpp create mode 100644 pysoundtouch/soundtouch/source/SoundStretch/RunParameters.h create mode 100644 pysoundtouch/soundtouch/source/SoundStretch/WavFile.cpp create mode 100644 pysoundtouch/soundtouch/source/SoundStretch/WavFile.h create mode 100644 pysoundtouch/soundtouch/source/SoundStretch/main.cpp create mode 100755 pysoundtouch/soundtouch/source/SoundStretch/soundstretch create mode 100644 pysoundtouch/soundtouch/source/SoundStretch/soundstretch.dsp create mode 100644 pysoundtouch/soundtouch/source/SoundStretch/soundstretch.dsw create mode 100644 pysoundtouch/soundtouch/source/SoundStretch/soundstretch.sln create mode 100644 pysoundtouch/soundtouch/source/SoundStretch/soundstretch.vcproj create mode 100644 pysoundtouch/soundtouch/source/SoundTouch/.deps/AAFilter.Plo create mode 100644 pysoundtouch/soundtouch/source/SoundTouch/.deps/BPMDetect.Plo create mode 100644 pysoundtouch/soundtouch/source/SoundTouch/.deps/FIFOSampleBuffer.Plo create mode 100644 pysoundtouch/soundtouch/source/SoundTouch/.deps/FIRFilter.Plo create mode 100644 pysoundtouch/soundtouch/source/SoundTouch/.deps/PeakFinder.Plo create mode 100644 pysoundtouch/soundtouch/source/SoundTouch/.deps/RateTransposer.Plo create mode 100644 pysoundtouch/soundtouch/source/SoundTouch/.deps/SoundTouch.Plo create mode 100644 pysoundtouch/soundtouch/source/SoundTouch/.deps/TDStretch.Plo create mode 100644 pysoundtouch/soundtouch/source/SoundTouch/.deps/cpu_detect_x86_gcc.Plo create mode 100644 pysoundtouch/soundtouch/source/SoundTouch/.deps/mmx_optimized.Plo create mode 100644 pysoundtouch/soundtouch/source/SoundTouch/.deps/sse_optimized.Plo create mode 100644 pysoundtouch/soundtouch/source/SoundTouch/3dnow_win.cpp create mode 100644 pysoundtouch/soundtouch/source/SoundTouch/AAFilter.cpp create mode 100644 pysoundtouch/soundtouch/source/SoundTouch/AAFilter.h create mode 100644 pysoundtouch/soundtouch/source/SoundTouch/BPMDetect.cpp create mode 100644 pysoundtouch/soundtouch/source/SoundTouch/FIFOSampleBuffer.cpp create mode 100644 pysoundtouch/soundtouch/source/SoundTouch/FIRFilter.cpp create mode 100644 pysoundtouch/soundtouch/source/SoundTouch/FIRFilter.h create mode 100644 pysoundtouch/soundtouch/source/SoundTouch/Makefile create mode 100644 pysoundtouch/soundtouch/source/SoundTouch/Makefile.am create mode 100644 pysoundtouch/soundtouch/source/SoundTouch/Makefile.in create mode 100644 pysoundtouch/soundtouch/source/SoundTouch/PeakFinder.cpp create mode 100644 pysoundtouch/soundtouch/source/SoundTouch/PeakFinder.h create mode 100644 pysoundtouch/soundtouch/source/SoundTouch/RateTransposer.cpp create mode 100644 pysoundtouch/soundtouch/source/SoundTouch/RateTransposer.h create mode 100644 pysoundtouch/soundtouch/source/SoundTouch/SoundTouch.cpp create mode 100644 pysoundtouch/soundtouch/source/SoundTouch/SoundTouch.dsp create mode 100644 pysoundtouch/soundtouch/source/SoundTouch/SoundTouch.dsw create mode 100644 pysoundtouch/soundtouch/source/SoundTouch/SoundTouch.sln create mode 100644 pysoundtouch/soundtouch/source/SoundTouch/SoundTouch.vcproj create mode 100644 pysoundtouch/soundtouch/source/SoundTouch/TDStretch.cpp create mode 100644 pysoundtouch/soundtouch/source/SoundTouch/TDStretch.h create mode 100644 pysoundtouch/soundtouch/source/SoundTouch/cpu_detect.h create mode 100644 pysoundtouch/soundtouch/source/SoundTouch/cpu_detect_x86_gcc.cpp create mode 100644 pysoundtouch/soundtouch/source/SoundTouch/cpu_detect_x86_win.cpp create mode 100644 pysoundtouch/soundtouch/source/SoundTouch/mmx_optimized.cpp create mode 100644 pysoundtouch/soundtouch/source/SoundTouch/sse_optimized.cpp create mode 100644 pysoundtouch/soundtouch/source/SoundTouchDLL/SoundTouchDLL.cpp create mode 100644 pysoundtouch/soundtouch/source/SoundTouchDLL/SoundTouchDLL.h create mode 100644 pysoundtouch/soundtouch/source/SoundTouchDLL/SoundTouchDLL.pas create mode 100644 pysoundtouch/soundtouch/source/SoundTouchDLL/SoundTouchDLL.rc create mode 100644 pysoundtouch/soundtouch/source/SoundTouchDLL/SoundTouchDLL.sln create mode 100644 pysoundtouch/soundtouch/source/SoundTouchDLL/SoundTouchDLL.vcproj (limited to 'pysoundtouch/soundtouch/source') diff --git a/pysoundtouch/soundtouch/source/Makefile b/pysoundtouch/soundtouch/source/Makefile new file mode 100644 index 0000000..4995a82 --- /dev/null +++ b/pysoundtouch/soundtouch/source/Makefile @@ -0,0 +1,631 @@ +# Makefile.in generated by automake 1.15 from Makefile.am. +# source/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994-2014 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/soundtouch +pkgincludedir = $(includedir)/soundtouch +pkglibdir = $(libdir)/soundtouch +pkglibexecdir = $(libexecdir)/soundtouch +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-unknown-linux-gnu +host_triplet = x86_64-unknown-linux-gnu +subdir = source +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/m4/libtool.m4 \ + $(top_srcdir)/config/m4/ltoptions.m4 \ + $(top_srcdir)/config/m4/ltsugar.m4 \ + $(top_srcdir)/config/m4/ltversion.m4 \ + $(top_srcdir)/config/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/soundtouch_config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_$(V)) +am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + distdir +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +am__DIST_COMMON = $(srcdir)/Makefile.in \ + $(top_srcdir)/config/am_include.mk +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = ${SHELL} /home/pepper/soundtouch/pysoundtouch/soundtouch/config/missing aclocal-1.15 +AMTAR = $${TAR-tar} +AM_DEFAULT_VERBOSITY = 1 +AR = ar +AUTOCONF = ${SHELL} /home/pepper/soundtouch/pysoundtouch/soundtouch/config/missing autoconf +AUTOHEADER = ${SHELL} /home/pepper/soundtouch/pysoundtouch/soundtouch/config/missing autoheader +AUTOMAKE = ${SHELL} /home/pepper/soundtouch/pysoundtouch/soundtouch/config/missing automake-1.15 +AWK = gawk +CC = gcc +CCDEPMODE = depmode=gcc3 +CFLAGS = -g -O2 +CPP = gcc -E +CPPFLAGS = +CXX = g++ +CXXCPP = g++ -E +CXXDEPMODE = depmode=gcc3 +CXXFLAGS = -fPIC +CYGPATH_W = echo +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +DLLTOOL = false +DSYMUTIL = +DUMPBIN = +ECHO_C = +ECHO_N = -n +ECHO_T = +EGREP = /usr/bin/grep -E +EXEEXT = +FGREP = /usr/bin/grep -F +GREP = /usr/bin/grep +INSTALL = /usr/bin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +LD = /usr/bin/ld -m elf_x86_64 +LDFLAGS = +LIBOBJS = +LIBS = -lm +LIBTOOL = $(SHELL) $(top_builddir)/libtool +LIPO = +LN_S = ln -s +LTLIBOBJS = +LT_SYS_LIBRARY_PATH = +MAKEINFO = ${SHELL} /home/pepper/soundtouch/pysoundtouch/soundtouch/config/missing makeinfo +MANIFEST_TOOL = : +MKDIR_P = /usr/bin/mkdir -p +NM = /usr/bin/nm -B +NMEDIT = +OBJDUMP = objdump +OBJEXT = o +OTOOL = +OTOOL64 = +PACKAGE = soundtouch +PACKAGE_BUGREPORT = http://www.surina.net/soundtouch +PACKAGE_NAME = SoundTouch +PACKAGE_STRING = SoundTouch 1.4.0 +PACKAGE_TARNAME = soundtouch +PACKAGE_URL = +PACKAGE_VERSION = 1.4.0 +PATH_SEPARATOR = : +RANLIB = ranlib +SED = /usr/bin/sed +SET_MAKE = +SHELL = /bin/sh +STRIP = strip +VERSION = 1.4.0 +abs_builddir = /home/pepper/soundtouch/pysoundtouch/soundtouch/source +abs_srcdir = /home/pepper/soundtouch/pysoundtouch/soundtouch/source +abs_top_builddir = /home/pepper/soundtouch/pysoundtouch/soundtouch +abs_top_srcdir = /home/pepper/soundtouch/pysoundtouch/soundtouch +ac_ct_AR = ar +ac_ct_CC = gcc +ac_ct_CXX = g++ +ac_ct_DUMPBIN = +am__include = include +am__leading_dot = . +am__quote = +am__tar = $${TAR-tar} chof - "$$tardir" +am__untar = $${TAR-tar} xf - +bindir = ${exec_prefix}/bin +build = x86_64-unknown-linux-gnu +build_alias = +build_cpu = x86_64 +build_os = linux-gnu +build_vendor = unknown +builddir = . +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +exec_prefix = ${prefix} +host = x86_64-unknown-linux-gnu +host_alias = +host_cpu = x86_64 +host_os = linux-gnu +host_vendor = unknown +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = ${SHELL} /home/pepper/soundtouch/pysoundtouch/soundtouch/config/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = $(MKDIR_P) +oldincludedir = /usr/include +pdfdir = ${docdir} +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +srcdir = . +sysconfdir = ${prefix}/etc +target_alias = +top_build_prefix = ../ +top_builddir = .. +top_srcdir = .. +INCLUDES = -I$(top_srcdir)/include + +# doc directory +pkgdocdir = $(prefix)/doc/soundtouch +SUBDIRS = SoundTouch SoundStretch +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/config/am_include.mk $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign source/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign source/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_srcdir)/config/am_include.mk $(am__empty): + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +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-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(am__recursive_targets) install-am install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ + check-am clean clean-generic clean-libtool cscopelist-am ctags \ + ctags-am distclean 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-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am tags tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +# set to something if you want other stuff to be included in the distribution tarball +#EXTRA_DIST= + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/pysoundtouch/soundtouch/source/Makefile.am b/pysoundtouch/soundtouch/source/Makefile.am new file mode 100644 index 0000000..960d8a9 --- /dev/null +++ b/pysoundtouch/soundtouch/source/Makefile.am @@ -0,0 +1,28 @@ +## Process this file with automake to create Makefile.in +## +## $Id: Makefile.am 38 2008-12-25 17:00:23Z oparviai $ +## +## Copyright (C) 2003 - David W. Durham +## +## This file is part of SoundTouch, an audio processing library for pitch/time adjustments +## +## SoundTouch is free software; you can redistribute it and/or modify it under the +## terms of the GNU General Public License as published by the Free Software +## Foundation; either version 2 of the License, or (at your option) any later +## version. +## +## SoundTouch is distributed in the hope that it will be useful, but WITHOUT ANY +## WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +## A PARTICULAR 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 $(top_srcdir)/config/am_include.mk + +SUBDIRS=SoundTouch SoundStretch + +# set to something if you want other stuff to be included in the distribution tarball +#EXTRA_DIST= + diff --git a/pysoundtouch/soundtouch/source/Makefile.in b/pysoundtouch/soundtouch/source/Makefile.in new file mode 100644 index 0000000..93dcee5 --- /dev/null +++ b/pysoundtouch/soundtouch/source/Makefile.in @@ -0,0 +1,631 @@ +# Makefile.in generated by automake 1.15 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2014 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = source +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/m4/libtool.m4 \ + $(top_srcdir)/config/m4/ltoptions.m4 \ + $(top_srcdir)/config/m4/ltsugar.m4 \ + $(top_srcdir)/config/m4/ltversion.m4 \ + $(top_srcdir)/config/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/soundtouch_config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + distdir +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +am__DIST_COMMON = $(srcdir)/Makefile.in \ + $(top_srcdir)/config/am_include.mk +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +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@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +INCLUDES = -I$(top_srcdir)/include + +# doc directory +pkgdocdir = $(prefix)/doc/@PACKAGE@ +SUBDIRS = SoundTouch SoundStretch +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/config/am_include.mk $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign source/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign source/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_srcdir)/config/am_include.mk $(am__empty): + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +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-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(am__recursive_targets) install-am install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ + check-am clean clean-generic clean-libtool cscopelist-am ctags \ + ctags-am distclean 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-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am tags tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +# set to something if you want other stuff to be included in the distribution tarball +#EXTRA_DIST= + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/pysoundtouch/soundtouch/source/SoundStretch/.deps/soundstretch-RunParameters.Po b/pysoundtouch/soundtouch/source/SoundStretch/.deps/soundstretch-RunParameters.Po new file mode 100644 index 0000000..d852499 --- /dev/null +++ b/pysoundtouch/soundtouch/source/SoundStretch/.deps/soundstretch-RunParameters.Po @@ -0,0 +1,249 @@ +soundstretch-RunParameters.o: RunParameters.cpp \ + /usr/include/stdc-predef.h /usr/include/c++/5.1.0/stdexcept \ + /usr/include/c++/5.1.0/exception \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/c++config.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/os_defines.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \ + /usr/include/gnu/stubs-64.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/cpu_defines.h \ + /usr/include/c++/5.1.0/bits/atomic_lockfree_defines.h \ + /usr/include/c++/5.1.0/string /usr/include/c++/5.1.0/bits/stringfwd.h \ + /usr/include/c++/5.1.0/bits/memoryfwd.h \ + /usr/include/c++/5.1.0/bits/char_traits.h \ + /usr/include/c++/5.1.0/bits/stl_algobase.h \ + /usr/include/c++/5.1.0/bits/functexcept.h \ + /usr/include/c++/5.1.0/bits/exception_defines.h \ + /usr/include/c++/5.1.0/bits/cpp_type_traits.h \ + /usr/include/c++/5.1.0/ext/type_traits.h \ + /usr/include/c++/5.1.0/ext/numeric_traits.h \ + /usr/include/c++/5.1.0/bits/stl_pair.h \ + /usr/include/c++/5.1.0/bits/move.h \ + /usr/include/c++/5.1.0/bits/concept_check.h \ + /usr/include/c++/5.1.0/bits/stl_iterator_base_types.h \ + /usr/include/c++/5.1.0/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/5.1.0/debug/debug.h \ + /usr/include/c++/5.1.0/bits/stl_iterator.h \ + /usr/include/c++/5.1.0/bits/ptr_traits.h \ + /usr/include/c++/5.1.0/bits/predefined_ops.h \ + /usr/include/c++/5.1.0/bits/postypes.h /usr/include/c++/5.1.0/cwchar \ + /usr/include/wchar.h /usr/include/stdio.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/include/stdarg.h \ + /usr/include/bits/wchar.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/include/stddef.h \ + /usr/include/xlocale.h /usr/include/c++/5.1.0/bits/allocator.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/c++allocator.h \ + /usr/include/c++/5.1.0/ext/new_allocator.h /usr/include/c++/5.1.0/new \ + /usr/include/c++/5.1.0/bits/localefwd.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/c++locale.h \ + /usr/include/c++/5.1.0/clocale /usr/include/locale.h \ + /usr/include/bits/locale.h /usr/include/c++/5.1.0/iosfwd \ + /usr/include/c++/5.1.0/cctype /usr/include/ctype.h \ + /usr/include/bits/types.h /usr/include/bits/typesizes.h \ + /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/bits/byteswap.h /usr/include/bits/byteswap-16.h \ + /usr/include/c++/5.1.0/bits/ostream_insert.h \ + /usr/include/c++/5.1.0/bits/cxxabi_forced.h \ + /usr/include/c++/5.1.0/bits/stl_function.h \ + /usr/include/c++/5.1.0/backward/binders.h \ + /usr/include/c++/5.1.0/bits/range_access.h \ + /usr/include/c++/5.1.0/bits/basic_string.h \ + /usr/include/c++/5.1.0/ext/atomicity.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/gthr.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h /usr/include/time.h \ + /usr/include/bits/sched.h /usr/include/bits/time.h \ + /usr/include/bits/timex.h /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/setjmp.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/atomic_word.h \ + /usr/include/c++/5.1.0/ext/alloc_traits.h \ + /usr/include/c++/5.1.0/bits/basic_string.tcc /usr/include/stdlib.h \ + /usr/include/bits/waitflags.h /usr/include/bits/waitstatus.h \ + /usr/include/sys/types.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/sys/sysmacros.h /usr/include/alloca.h \ + /usr/include/bits/stdlib-bsearch.h /usr/include/bits/stdlib-float.h \ + RunParameters.h ../../include/STTypes.h \ + ../../include/soundtouch_config.h + +/usr/include/stdc-predef.h: + +/usr/include/c++/5.1.0/stdexcept: + +/usr/include/c++/5.1.0/exception: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/c++config.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/os_defines.h: + +/usr/include/features.h: + +/usr/include/sys/cdefs.h: + +/usr/include/bits/wordsize.h: + +/usr/include/gnu/stubs.h: + +/usr/include/gnu/stubs-64.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/cpu_defines.h: + +/usr/include/c++/5.1.0/bits/atomic_lockfree_defines.h: + +/usr/include/c++/5.1.0/string: + +/usr/include/c++/5.1.0/bits/stringfwd.h: + +/usr/include/c++/5.1.0/bits/memoryfwd.h: + +/usr/include/c++/5.1.0/bits/char_traits.h: + +/usr/include/c++/5.1.0/bits/stl_algobase.h: + +/usr/include/c++/5.1.0/bits/functexcept.h: + +/usr/include/c++/5.1.0/bits/exception_defines.h: + +/usr/include/c++/5.1.0/bits/cpp_type_traits.h: + +/usr/include/c++/5.1.0/ext/type_traits.h: + +/usr/include/c++/5.1.0/ext/numeric_traits.h: + +/usr/include/c++/5.1.0/bits/stl_pair.h: + +/usr/include/c++/5.1.0/bits/move.h: + +/usr/include/c++/5.1.0/bits/concept_check.h: + +/usr/include/c++/5.1.0/bits/stl_iterator_base_types.h: + +/usr/include/c++/5.1.0/bits/stl_iterator_base_funcs.h: + +/usr/include/c++/5.1.0/debug/debug.h: + +/usr/include/c++/5.1.0/bits/stl_iterator.h: + +/usr/include/c++/5.1.0/bits/ptr_traits.h: + +/usr/include/c++/5.1.0/bits/predefined_ops.h: + +/usr/include/c++/5.1.0/bits/postypes.h: + +/usr/include/c++/5.1.0/cwchar: + +/usr/include/wchar.h: + +/usr/include/stdio.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/include/stdarg.h: + +/usr/include/bits/wchar.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/include/stddef.h: + +/usr/include/xlocale.h: + +/usr/include/c++/5.1.0/bits/allocator.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/c++allocator.h: + +/usr/include/c++/5.1.0/ext/new_allocator.h: + +/usr/include/c++/5.1.0/new: + +/usr/include/c++/5.1.0/bits/localefwd.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/c++locale.h: + +/usr/include/c++/5.1.0/clocale: + +/usr/include/locale.h: + +/usr/include/bits/locale.h: + +/usr/include/c++/5.1.0/iosfwd: + +/usr/include/c++/5.1.0/cctype: + +/usr/include/ctype.h: + +/usr/include/bits/types.h: + +/usr/include/bits/typesizes.h: + +/usr/include/endian.h: + +/usr/include/bits/endian.h: + +/usr/include/bits/byteswap.h: + +/usr/include/bits/byteswap-16.h: + +/usr/include/c++/5.1.0/bits/ostream_insert.h: + +/usr/include/c++/5.1.0/bits/cxxabi_forced.h: + +/usr/include/c++/5.1.0/bits/stl_function.h: + +/usr/include/c++/5.1.0/backward/binders.h: + +/usr/include/c++/5.1.0/bits/range_access.h: + +/usr/include/c++/5.1.0/bits/basic_string.h: + +/usr/include/c++/5.1.0/ext/atomicity.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/gthr.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/gthr-default.h: + +/usr/include/pthread.h: + +/usr/include/sched.h: + +/usr/include/time.h: + +/usr/include/bits/sched.h: + +/usr/include/bits/time.h: + +/usr/include/bits/timex.h: + +/usr/include/bits/pthreadtypes.h: + +/usr/include/bits/setjmp.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/atomic_word.h: + +/usr/include/c++/5.1.0/ext/alloc_traits.h: + +/usr/include/c++/5.1.0/bits/basic_string.tcc: + +/usr/include/stdlib.h: + +/usr/include/bits/waitflags.h: + +/usr/include/bits/waitstatus.h: + +/usr/include/sys/types.h: + +/usr/include/sys/select.h: + +/usr/include/bits/select.h: + +/usr/include/bits/sigset.h: + +/usr/include/sys/sysmacros.h: + +/usr/include/alloca.h: + +/usr/include/bits/stdlib-bsearch.h: + +/usr/include/bits/stdlib-float.h: + +RunParameters.h: + +../../include/STTypes.h: + +../../include/soundtouch_config.h: diff --git a/pysoundtouch/soundtouch/source/SoundStretch/.deps/soundstretch-WavFile.Po b/pysoundtouch/soundtouch/source/SoundStretch/.deps/soundstretch-WavFile.Po new file mode 100644 index 0000000..30147f5 --- /dev/null +++ b/pysoundtouch/soundtouch/source/SoundStretch/.deps/soundstretch-WavFile.Po @@ -0,0 +1,256 @@ +soundstretch-WavFile.o: WavFile.cpp /usr/include/stdc-predef.h \ + /usr/include/stdio.h /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \ + /usr/include/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/typesizes.h \ + /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/bits/stdio.h /usr/include/c++/5.1.0/stdexcept \ + /usr/include/c++/5.1.0/exception \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/c++config.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/os_defines.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/cpu_defines.h \ + /usr/include/c++/5.1.0/bits/atomic_lockfree_defines.h \ + /usr/include/c++/5.1.0/string /usr/include/c++/5.1.0/bits/stringfwd.h \ + /usr/include/c++/5.1.0/bits/memoryfwd.h \ + /usr/include/c++/5.1.0/bits/char_traits.h \ + /usr/include/c++/5.1.0/bits/stl_algobase.h \ + /usr/include/c++/5.1.0/bits/functexcept.h \ + /usr/include/c++/5.1.0/bits/exception_defines.h \ + /usr/include/c++/5.1.0/bits/cpp_type_traits.h \ + /usr/include/c++/5.1.0/ext/type_traits.h \ + /usr/include/c++/5.1.0/ext/numeric_traits.h \ + /usr/include/c++/5.1.0/bits/stl_pair.h \ + /usr/include/c++/5.1.0/bits/move.h \ + /usr/include/c++/5.1.0/bits/concept_check.h \ + /usr/include/c++/5.1.0/bits/stl_iterator_base_types.h \ + /usr/include/c++/5.1.0/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/5.1.0/debug/debug.h \ + /usr/include/c++/5.1.0/bits/stl_iterator.h \ + /usr/include/c++/5.1.0/bits/ptr_traits.h \ + /usr/include/c++/5.1.0/bits/predefined_ops.h \ + /usr/include/c++/5.1.0/bits/postypes.h /usr/include/c++/5.1.0/cwchar \ + /usr/include/bits/wchar.h /usr/include/xlocale.h \ + /usr/include/c++/5.1.0/bits/allocator.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/c++allocator.h \ + /usr/include/c++/5.1.0/ext/new_allocator.h /usr/include/c++/5.1.0/new \ + /usr/include/c++/5.1.0/bits/localefwd.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/c++locale.h \ + /usr/include/c++/5.1.0/clocale /usr/include/locale.h \ + /usr/include/bits/locale.h /usr/include/c++/5.1.0/iosfwd \ + /usr/include/c++/5.1.0/cctype /usr/include/ctype.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/bits/byteswap.h \ + /usr/include/bits/byteswap-16.h \ + /usr/include/c++/5.1.0/bits/ostream_insert.h \ + /usr/include/c++/5.1.0/bits/cxxabi_forced.h \ + /usr/include/c++/5.1.0/bits/stl_function.h \ + /usr/include/c++/5.1.0/backward/binders.h \ + /usr/include/c++/5.1.0/bits/range_access.h \ + /usr/include/c++/5.1.0/bits/basic_string.h \ + /usr/include/c++/5.1.0/ext/atomicity.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/gthr.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h /usr/include/time.h \ + /usr/include/bits/sched.h /usr/include/bits/time.h \ + /usr/include/bits/timex.h /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/setjmp.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/atomic_word.h \ + /usr/include/c++/5.1.0/ext/alloc_traits.h \ + /usr/include/c++/5.1.0/bits/basic_string.tcc \ + /usr/include/c++/5.1.0/cstring /usr/include/string.h \ + /usr/include/assert.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/include-fixed/limits.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/include-fixed/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/xopen_lim.h WavFile.h + +/usr/include/stdc-predef.h: + +/usr/include/stdio.h: + +/usr/include/features.h: + +/usr/include/sys/cdefs.h: + +/usr/include/bits/wordsize.h: + +/usr/include/gnu/stubs.h: + +/usr/include/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/include/stddef.h: + +/usr/include/bits/types.h: + +/usr/include/bits/typesizes.h: + +/usr/include/libio.h: + +/usr/include/_G_config.h: + +/usr/include/wchar.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/include/stdarg.h: + +/usr/include/bits/stdio_lim.h: + +/usr/include/bits/sys_errlist.h: + +/usr/include/bits/stdio.h: + +/usr/include/c++/5.1.0/stdexcept: + +/usr/include/c++/5.1.0/exception: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/c++config.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/os_defines.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/cpu_defines.h: + +/usr/include/c++/5.1.0/bits/atomic_lockfree_defines.h: + +/usr/include/c++/5.1.0/string: + +/usr/include/c++/5.1.0/bits/stringfwd.h: + +/usr/include/c++/5.1.0/bits/memoryfwd.h: + +/usr/include/c++/5.1.0/bits/char_traits.h: + +/usr/include/c++/5.1.0/bits/stl_algobase.h: + +/usr/include/c++/5.1.0/bits/functexcept.h: + +/usr/include/c++/5.1.0/bits/exception_defines.h: + +/usr/include/c++/5.1.0/bits/cpp_type_traits.h: + +/usr/include/c++/5.1.0/ext/type_traits.h: + +/usr/include/c++/5.1.0/ext/numeric_traits.h: + +/usr/include/c++/5.1.0/bits/stl_pair.h: + +/usr/include/c++/5.1.0/bits/move.h: + +/usr/include/c++/5.1.0/bits/concept_check.h: + +/usr/include/c++/5.1.0/bits/stl_iterator_base_types.h: + +/usr/include/c++/5.1.0/bits/stl_iterator_base_funcs.h: + +/usr/include/c++/5.1.0/debug/debug.h: + +/usr/include/c++/5.1.0/bits/stl_iterator.h: + +/usr/include/c++/5.1.0/bits/ptr_traits.h: + +/usr/include/c++/5.1.0/bits/predefined_ops.h: + +/usr/include/c++/5.1.0/bits/postypes.h: + +/usr/include/c++/5.1.0/cwchar: + +/usr/include/bits/wchar.h: + +/usr/include/xlocale.h: + +/usr/include/c++/5.1.0/bits/allocator.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/c++allocator.h: + +/usr/include/c++/5.1.0/ext/new_allocator.h: + +/usr/include/c++/5.1.0/new: + +/usr/include/c++/5.1.0/bits/localefwd.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/c++locale.h: + +/usr/include/c++/5.1.0/clocale: + +/usr/include/locale.h: + +/usr/include/bits/locale.h: + +/usr/include/c++/5.1.0/iosfwd: + +/usr/include/c++/5.1.0/cctype: + +/usr/include/ctype.h: + +/usr/include/endian.h: + +/usr/include/bits/endian.h: + +/usr/include/bits/byteswap.h: + +/usr/include/bits/byteswap-16.h: + +/usr/include/c++/5.1.0/bits/ostream_insert.h: + +/usr/include/c++/5.1.0/bits/cxxabi_forced.h: + +/usr/include/c++/5.1.0/bits/stl_function.h: + +/usr/include/c++/5.1.0/backward/binders.h: + +/usr/include/c++/5.1.0/bits/range_access.h: + +/usr/include/c++/5.1.0/bits/basic_string.h: + +/usr/include/c++/5.1.0/ext/atomicity.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/gthr.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/gthr-default.h: + +/usr/include/pthread.h: + +/usr/include/sched.h: + +/usr/include/time.h: + +/usr/include/bits/sched.h: + +/usr/include/bits/time.h: + +/usr/include/bits/timex.h: + +/usr/include/bits/pthreadtypes.h: + +/usr/include/bits/setjmp.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/atomic_word.h: + +/usr/include/c++/5.1.0/ext/alloc_traits.h: + +/usr/include/c++/5.1.0/bits/basic_string.tcc: + +/usr/include/c++/5.1.0/cstring: + +/usr/include/string.h: + +/usr/include/assert.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/include-fixed/limits.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/include-fixed/syslimits.h: + +/usr/include/limits.h: + +/usr/include/bits/posix1_lim.h: + +/usr/include/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/bits/posix2_lim.h: + +/usr/include/bits/xopen_lim.h: + +WavFile.h: diff --git a/pysoundtouch/soundtouch/source/SoundStretch/.deps/soundstretch-main.Po b/pysoundtouch/soundtouch/source/SoundStretch/.deps/soundstretch-main.Po new file mode 100644 index 0000000..b13fcae --- /dev/null +++ b/pysoundtouch/soundtouch/source/SoundStretch/.deps/soundstretch-main.Po @@ -0,0 +1,279 @@ +soundstretch-main.o: main.cpp /usr/include/stdc-predef.h \ + /usr/include/c++/5.1.0/stdexcept /usr/include/c++/5.1.0/exception \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/c++config.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/os_defines.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \ + /usr/include/gnu/stubs-64.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/cpu_defines.h \ + /usr/include/c++/5.1.0/bits/atomic_lockfree_defines.h \ + /usr/include/c++/5.1.0/string /usr/include/c++/5.1.0/bits/stringfwd.h \ + /usr/include/c++/5.1.0/bits/memoryfwd.h \ + /usr/include/c++/5.1.0/bits/char_traits.h \ + /usr/include/c++/5.1.0/bits/stl_algobase.h \ + /usr/include/c++/5.1.0/bits/functexcept.h \ + /usr/include/c++/5.1.0/bits/exception_defines.h \ + /usr/include/c++/5.1.0/bits/cpp_type_traits.h \ + /usr/include/c++/5.1.0/ext/type_traits.h \ + /usr/include/c++/5.1.0/ext/numeric_traits.h \ + /usr/include/c++/5.1.0/bits/stl_pair.h \ + /usr/include/c++/5.1.0/bits/move.h \ + /usr/include/c++/5.1.0/bits/concept_check.h \ + /usr/include/c++/5.1.0/bits/stl_iterator_base_types.h \ + /usr/include/c++/5.1.0/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/5.1.0/debug/debug.h \ + /usr/include/c++/5.1.0/bits/stl_iterator.h \ + /usr/include/c++/5.1.0/bits/ptr_traits.h \ + /usr/include/c++/5.1.0/bits/predefined_ops.h \ + /usr/include/c++/5.1.0/bits/postypes.h /usr/include/c++/5.1.0/cwchar \ + /usr/include/wchar.h /usr/include/stdio.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/include/stdarg.h \ + /usr/include/bits/wchar.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/include/stddef.h \ + /usr/include/xlocale.h /usr/include/c++/5.1.0/bits/allocator.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/c++allocator.h \ + /usr/include/c++/5.1.0/ext/new_allocator.h /usr/include/c++/5.1.0/new \ + /usr/include/c++/5.1.0/bits/localefwd.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/c++locale.h \ + /usr/include/c++/5.1.0/clocale /usr/include/locale.h \ + /usr/include/bits/locale.h /usr/include/c++/5.1.0/iosfwd \ + /usr/include/c++/5.1.0/cctype /usr/include/ctype.h \ + /usr/include/bits/types.h /usr/include/bits/typesizes.h \ + /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/bits/byteswap.h /usr/include/bits/byteswap-16.h \ + /usr/include/c++/5.1.0/bits/ostream_insert.h \ + /usr/include/c++/5.1.0/bits/cxxabi_forced.h \ + /usr/include/c++/5.1.0/bits/stl_function.h \ + /usr/include/c++/5.1.0/backward/binders.h \ + /usr/include/c++/5.1.0/bits/range_access.h \ + /usr/include/c++/5.1.0/bits/basic_string.h \ + /usr/include/c++/5.1.0/ext/atomicity.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/gthr.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h /usr/include/time.h \ + /usr/include/bits/sched.h /usr/include/bits/time.h \ + /usr/include/bits/timex.h /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/setjmp.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/atomic_word.h \ + /usr/include/c++/5.1.0/ext/alloc_traits.h \ + /usr/include/c++/5.1.0/bits/basic_string.tcc /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + /usr/include/bits/sys_errlist.h /usr/include/bits/stdio.h \ + /usr/include/string.h RunParameters.h ../../include/STTypes.h \ + ../../include/soundtouch_config.h WavFile.h ../../include/SoundTouch.h \ + ../../include/FIFOSamplePipe.h /usr/include/assert.h \ + /usr/include/stdlib.h /usr/include/bits/waitflags.h \ + /usr/include/bits/waitstatus.h /usr/include/sys/types.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h /usr/include/bits/stdlib-bsearch.h \ + /usr/include/bits/stdlib-float.h ../../include/STTypes.h \ + ../../include/BPMDetect.h ../../include/FIFOSampleBuffer.h + +/usr/include/stdc-predef.h: + +/usr/include/c++/5.1.0/stdexcept: + +/usr/include/c++/5.1.0/exception: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/c++config.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/os_defines.h: + +/usr/include/features.h: + +/usr/include/sys/cdefs.h: + +/usr/include/bits/wordsize.h: + +/usr/include/gnu/stubs.h: + +/usr/include/gnu/stubs-64.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/cpu_defines.h: + +/usr/include/c++/5.1.0/bits/atomic_lockfree_defines.h: + +/usr/include/c++/5.1.0/string: + +/usr/include/c++/5.1.0/bits/stringfwd.h: + +/usr/include/c++/5.1.0/bits/memoryfwd.h: + +/usr/include/c++/5.1.0/bits/char_traits.h: + +/usr/include/c++/5.1.0/bits/stl_algobase.h: + +/usr/include/c++/5.1.0/bits/functexcept.h: + +/usr/include/c++/5.1.0/bits/exception_defines.h: + +/usr/include/c++/5.1.0/bits/cpp_type_traits.h: + +/usr/include/c++/5.1.0/ext/type_traits.h: + +/usr/include/c++/5.1.0/ext/numeric_traits.h: + +/usr/include/c++/5.1.0/bits/stl_pair.h: + +/usr/include/c++/5.1.0/bits/move.h: + +/usr/include/c++/5.1.0/bits/concept_check.h: + +/usr/include/c++/5.1.0/bits/stl_iterator_base_types.h: + +/usr/include/c++/5.1.0/bits/stl_iterator_base_funcs.h: + +/usr/include/c++/5.1.0/debug/debug.h: + +/usr/include/c++/5.1.0/bits/stl_iterator.h: + +/usr/include/c++/5.1.0/bits/ptr_traits.h: + +/usr/include/c++/5.1.0/bits/predefined_ops.h: + +/usr/include/c++/5.1.0/bits/postypes.h: + +/usr/include/c++/5.1.0/cwchar: + +/usr/include/wchar.h: + +/usr/include/stdio.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/include/stdarg.h: + +/usr/include/bits/wchar.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/include/stddef.h: + +/usr/include/xlocale.h: + +/usr/include/c++/5.1.0/bits/allocator.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/c++allocator.h: + +/usr/include/c++/5.1.0/ext/new_allocator.h: + +/usr/include/c++/5.1.0/new: + +/usr/include/c++/5.1.0/bits/localefwd.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/c++locale.h: + +/usr/include/c++/5.1.0/clocale: + +/usr/include/locale.h: + +/usr/include/bits/locale.h: + +/usr/include/c++/5.1.0/iosfwd: + +/usr/include/c++/5.1.0/cctype: + +/usr/include/ctype.h: + +/usr/include/bits/types.h: + +/usr/include/bits/typesizes.h: + +/usr/include/endian.h: + +/usr/include/bits/endian.h: + +/usr/include/bits/byteswap.h: + +/usr/include/bits/byteswap-16.h: + +/usr/include/c++/5.1.0/bits/ostream_insert.h: + +/usr/include/c++/5.1.0/bits/cxxabi_forced.h: + +/usr/include/c++/5.1.0/bits/stl_function.h: + +/usr/include/c++/5.1.0/backward/binders.h: + +/usr/include/c++/5.1.0/bits/range_access.h: + +/usr/include/c++/5.1.0/bits/basic_string.h: + +/usr/include/c++/5.1.0/ext/atomicity.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/gthr.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/gthr-default.h: + +/usr/include/pthread.h: + +/usr/include/sched.h: + +/usr/include/time.h: + +/usr/include/bits/sched.h: + +/usr/include/bits/time.h: + +/usr/include/bits/timex.h: + +/usr/include/bits/pthreadtypes.h: + +/usr/include/bits/setjmp.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/atomic_word.h: + +/usr/include/c++/5.1.0/ext/alloc_traits.h: + +/usr/include/c++/5.1.0/bits/basic_string.tcc: + +/usr/include/libio.h: + +/usr/include/_G_config.h: + +/usr/include/bits/stdio_lim.h: + +/usr/include/bits/sys_errlist.h: + +/usr/include/bits/stdio.h: + +/usr/include/string.h: + +RunParameters.h: + +../../include/STTypes.h: + +../../include/soundtouch_config.h: + +WavFile.h: + +../../include/SoundTouch.h: + +../../include/FIFOSamplePipe.h: + +/usr/include/assert.h: + +/usr/include/stdlib.h: + +/usr/include/bits/waitflags.h: + +/usr/include/bits/waitstatus.h: + +/usr/include/sys/types.h: + +/usr/include/sys/select.h: + +/usr/include/bits/select.h: + +/usr/include/bits/sigset.h: + +/usr/include/sys/sysmacros.h: + +/usr/include/alloca.h: + +/usr/include/bits/stdlib-bsearch.h: + +/usr/include/bits/stdlib-float.h: + +../../include/STTypes.h: + +../../include/BPMDetect.h: + +../../include/FIFOSampleBuffer.h: diff --git a/pysoundtouch/soundtouch/source/SoundStretch/Makefile b/pysoundtouch/soundtouch/source/SoundStretch/Makefile new file mode 100644 index 0000000..4618197 --- /dev/null +++ b/pysoundtouch/soundtouch/source/SoundStretch/Makefile @@ -0,0 +1,700 @@ +# Makefile.in generated by automake 1.15 from Makefile.am. +# source/SoundStretch/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994-2014 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + + + +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/soundtouch +pkgincludedir = $(includedir)/soundtouch +pkglibdir = $(libdir)/soundtouch +pkglibexecdir = $(libexecdir)/soundtouch +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-unknown-linux-gnu +host_triplet = x86_64-unknown-linux-gnu +bin_PROGRAMS = soundstretch$(EXEEXT) +subdir = source/SoundStretch +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/m4/libtool.m4 \ + $(top_srcdir)/config/m4/ltoptions.m4 \ + $(top_srcdir)/config/m4/ltsugar.m4 \ + $(top_srcdir)/config/m4/ltversion.m4 \ + $(top_srcdir)/config/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/soundtouch_config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +PROGRAMS = $(bin_PROGRAMS) +am_soundstretch_OBJECTS = soundstretch-main.$(OBJEXT) \ + soundstretch-RunParameters.$(OBJEXT) \ + soundstretch-WavFile.$(OBJEXT) +soundstretch_OBJECTS = $(am_soundstretch_OBJECTS) +soundstretch_DEPENDENCIES = ../SoundTouch/libSoundTouch.la +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +am__v_lt_1 = +soundstretch_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(soundstretch_CXXFLAGS) \ + $(CXXFLAGS) $(soundstretch_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_P = $(am__v_P_$(V)) +am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I. -I$(top_builddir)/include +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_$(V)) +am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY)) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_$(V)) +am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = +SOURCES = $(soundstretch_SOURCES) +DIST_SOURCES = $(soundstretch_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +HEADERS = $(noinst_HEADERS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in \ + $(top_srcdir)/config/am_include.mk \ + $(top_srcdir)/config/depcomp +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = ${SHELL} /home/pepper/soundtouch/pysoundtouch/soundtouch/config/missing aclocal-1.15 +AMTAR = $${TAR-tar} +AM_DEFAULT_VERBOSITY = 1 +AR = ar +AUTOCONF = ${SHELL} /home/pepper/soundtouch/pysoundtouch/soundtouch/config/missing autoconf +AUTOHEADER = ${SHELL} /home/pepper/soundtouch/pysoundtouch/soundtouch/config/missing autoheader +AUTOMAKE = ${SHELL} /home/pepper/soundtouch/pysoundtouch/soundtouch/config/missing automake-1.15 +AWK = gawk +CC = gcc +CCDEPMODE = depmode=gcc3 +CFLAGS = -g -O2 +CPP = gcc -E +CPPFLAGS = +CXX = g++ +CXXCPP = g++ -E +CXXDEPMODE = depmode=gcc3 +CXXFLAGS = -fPIC +CYGPATH_W = echo +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +DLLTOOL = false +DSYMUTIL = +DUMPBIN = +ECHO_C = +ECHO_N = -n +ECHO_T = +EGREP = /usr/bin/grep -E +EXEEXT = +FGREP = /usr/bin/grep -F +GREP = /usr/bin/grep +INSTALL = /usr/bin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +LD = /usr/bin/ld -m elf_x86_64 +LDFLAGS = +LIBOBJS = +LIBS = -lm +LIBTOOL = $(SHELL) $(top_builddir)/libtool +LIPO = +LN_S = ln -s +LTLIBOBJS = +LT_SYS_LIBRARY_PATH = +MAKEINFO = ${SHELL} /home/pepper/soundtouch/pysoundtouch/soundtouch/config/missing makeinfo +MANIFEST_TOOL = : +MKDIR_P = /usr/bin/mkdir -p +NM = /usr/bin/nm -B +NMEDIT = +OBJDUMP = objdump +OBJEXT = o +OTOOL = +OTOOL64 = +PACKAGE = soundtouch +PACKAGE_BUGREPORT = http://www.surina.net/soundtouch +PACKAGE_NAME = SoundTouch +PACKAGE_STRING = SoundTouch 1.4.0 +PACKAGE_TARNAME = soundtouch +PACKAGE_URL = +PACKAGE_VERSION = 1.4.0 +PATH_SEPARATOR = : +RANLIB = ranlib +SED = /usr/bin/sed +SET_MAKE = +SHELL = /bin/sh +STRIP = strip +VERSION = 1.4.0 +abs_builddir = /home/pepper/soundtouch/pysoundtouch/soundtouch/source/SoundStretch +abs_srcdir = /home/pepper/soundtouch/pysoundtouch/soundtouch/source/SoundStretch +abs_top_builddir = /home/pepper/soundtouch/pysoundtouch/soundtouch +abs_top_srcdir = /home/pepper/soundtouch/pysoundtouch/soundtouch +ac_ct_AR = ar +ac_ct_CC = gcc +ac_ct_CXX = g++ +ac_ct_DUMPBIN = +am__include = include +am__leading_dot = . +am__quote = +am__tar = $${TAR-tar} chof - "$$tardir" +am__untar = $${TAR-tar} xf - +bindir = ${exec_prefix}/bin +build = x86_64-unknown-linux-gnu +build_alias = +build_cpu = x86_64 +build_os = linux-gnu +build_vendor = unknown +builddir = . +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +exec_prefix = ${prefix} +host = x86_64-unknown-linux-gnu +host_alias = +host_cpu = x86_64 +host_os = linux-gnu +host_vendor = unknown +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = ${SHELL} /home/pepper/soundtouch/pysoundtouch/soundtouch/config/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = $(MKDIR_P) +oldincludedir = /usr/include +pdfdir = ${docdir} +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +srcdir = . +sysconfdir = ${prefix}/etc +target_alias = +top_build_prefix = ../../ +top_builddir = ../.. +top_srcdir = ../.. +INCLUDES = -I$(top_srcdir)/include + +# doc directory +pkgdocdir = $(prefix)/doc/soundtouch +noinst_HEADERS = RunParameters.h WavFile.h + +# extra files to include in distrubution tarball +EXTRA_DIST = soundstretch.dsp soundstretch.dsw soundstretch.sln soundstretch.vcproj +soundstretch_SOURCES = main.cpp RunParameters.cpp WavFile.cpp +soundstretch_LDADD = ../SoundTouch/libSoundTouch.la -lm +soundstretch_LDFLAGS = -s +soundstretch_CXXFLAGS = -O3 +all: all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/config/am_include.mk $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign source/SoundStretch/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign source/SoundStretch/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_srcdir)/config/am_include.mk $(am__empty): + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' \ + `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +soundstretch$(EXEEXT): $(soundstretch_OBJECTS) $(soundstretch_DEPENDENCIES) $(EXTRA_soundstretch_DEPENDENCIES) + @rm -f soundstretch$(EXEEXT) + $(AM_V_CXXLD)$(soundstretch_LINK) $(soundstretch_OBJECTS) $(soundstretch_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +include ./$(DEPDIR)/soundstretch-RunParameters.Po +include ./$(DEPDIR)/soundstretch-WavFile.Po +include ./$(DEPDIR)/soundstretch-main.Po + +.cpp.o: + $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< + $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# $(AM_V_CXX)source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \ +# $(AM_V_CXX_no)$(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: + $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` + $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# $(AM_V_CXX)source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \ +# $(AM_V_CXX_no)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: + $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< + $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +# $(AM_V_CXX)source='$<' object='$@' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \ +# $(AM_V_CXX_no)$(LTCXXCOMPILE) -c -o $@ $< + +soundstretch-main.o: main.cpp + $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(soundstretch_CXXFLAGS) $(CXXFLAGS) -MT soundstretch-main.o -MD -MP -MF $(DEPDIR)/soundstretch-main.Tpo -c -o soundstretch-main.o `test -f 'main.cpp' || echo '$(srcdir)/'`main.cpp + $(AM_V_at)$(am__mv) $(DEPDIR)/soundstretch-main.Tpo $(DEPDIR)/soundstretch-main.Po +# $(AM_V_CXX)source='main.cpp' object='soundstretch-main.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \ +# $(AM_V_CXX_no)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(soundstretch_CXXFLAGS) $(CXXFLAGS) -c -o soundstretch-main.o `test -f 'main.cpp' || echo '$(srcdir)/'`main.cpp + +soundstretch-main.obj: main.cpp + $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(soundstretch_CXXFLAGS) $(CXXFLAGS) -MT soundstretch-main.obj -MD -MP -MF $(DEPDIR)/soundstretch-main.Tpo -c -o soundstretch-main.obj `if test -f 'main.cpp'; then $(CYGPATH_W) 'main.cpp'; else $(CYGPATH_W) '$(srcdir)/main.cpp'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/soundstretch-main.Tpo $(DEPDIR)/soundstretch-main.Po +# $(AM_V_CXX)source='main.cpp' object='soundstretch-main.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \ +# $(AM_V_CXX_no)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(soundstretch_CXXFLAGS) $(CXXFLAGS) -c -o soundstretch-main.obj `if test -f 'main.cpp'; then $(CYGPATH_W) 'main.cpp'; else $(CYGPATH_W) '$(srcdir)/main.cpp'; fi` + +soundstretch-RunParameters.o: RunParameters.cpp + $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(soundstretch_CXXFLAGS) $(CXXFLAGS) -MT soundstretch-RunParameters.o -MD -MP -MF $(DEPDIR)/soundstretch-RunParameters.Tpo -c -o soundstretch-RunParameters.o `test -f 'RunParameters.cpp' || echo '$(srcdir)/'`RunParameters.cpp + $(AM_V_at)$(am__mv) $(DEPDIR)/soundstretch-RunParameters.Tpo $(DEPDIR)/soundstretch-RunParameters.Po +# $(AM_V_CXX)source='RunParameters.cpp' object='soundstretch-RunParameters.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \ +# $(AM_V_CXX_no)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(soundstretch_CXXFLAGS) $(CXXFLAGS) -c -o soundstretch-RunParameters.o `test -f 'RunParameters.cpp' || echo '$(srcdir)/'`RunParameters.cpp + +soundstretch-RunParameters.obj: RunParameters.cpp + $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(soundstretch_CXXFLAGS) $(CXXFLAGS) -MT soundstretch-RunParameters.obj -MD -MP -MF $(DEPDIR)/soundstretch-RunParameters.Tpo -c -o soundstretch-RunParameters.obj `if test -f 'RunParameters.cpp'; then $(CYGPATH_W) 'RunParameters.cpp'; else $(CYGPATH_W) '$(srcdir)/RunParameters.cpp'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/soundstretch-RunParameters.Tpo $(DEPDIR)/soundstretch-RunParameters.Po +# $(AM_V_CXX)source='RunParameters.cpp' object='soundstretch-RunParameters.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \ +# $(AM_V_CXX_no)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(soundstretch_CXXFLAGS) $(CXXFLAGS) -c -o soundstretch-RunParameters.obj `if test -f 'RunParameters.cpp'; then $(CYGPATH_W) 'RunParameters.cpp'; else $(CYGPATH_W) '$(srcdir)/RunParameters.cpp'; fi` + +soundstretch-WavFile.o: WavFile.cpp + $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(soundstretch_CXXFLAGS) $(CXXFLAGS) -MT soundstretch-WavFile.o -MD -MP -MF $(DEPDIR)/soundstretch-WavFile.Tpo -c -o soundstretch-WavFile.o `test -f 'WavFile.cpp' || echo '$(srcdir)/'`WavFile.cpp + $(AM_V_at)$(am__mv) $(DEPDIR)/soundstretch-WavFile.Tpo $(DEPDIR)/soundstretch-WavFile.Po +# $(AM_V_CXX)source='WavFile.cpp' object='soundstretch-WavFile.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \ +# $(AM_V_CXX_no)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(soundstretch_CXXFLAGS) $(CXXFLAGS) -c -o soundstretch-WavFile.o `test -f 'WavFile.cpp' || echo '$(srcdir)/'`WavFile.cpp + +soundstretch-WavFile.obj: WavFile.cpp + $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(soundstretch_CXXFLAGS) $(CXXFLAGS) -MT soundstretch-WavFile.obj -MD -MP -MF $(DEPDIR)/soundstretch-WavFile.Tpo -c -o soundstretch-WavFile.obj `if test -f 'WavFile.cpp'; then $(CYGPATH_W) 'WavFile.cpp'; else $(CYGPATH_W) '$(srcdir)/WavFile.cpp'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/soundstretch-WavFile.Tpo $(DEPDIR)/soundstretch-WavFile.Po +# $(AM_V_CXX)source='WavFile.cpp' object='soundstretch-WavFile.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \ +# $(AM_V_CXX_no)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(soundstretch_CXXFLAGS) $(CXXFLAGS) -c -o soundstretch-WavFile.obj `if test -f 'WavFile.cpp'; then $(CYGPATH_W) 'WavFile.cpp'; else $(CYGPATH_W) '$(srcdir)/WavFile.cpp'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ + clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \ + ctags ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-binPROGRAMS \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am uninstall-binPROGRAMS + +.PRECIOUS: Makefile + + +#clean-local: +# -rm -f additional-files-to-remove-on-make-clean + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/pysoundtouch/soundtouch/source/SoundStretch/Makefile.am b/pysoundtouch/soundtouch/source/SoundStretch/Makefile.am new file mode 100644 index 0000000..a97bbdc --- /dev/null +++ b/pysoundtouch/soundtouch/source/SoundStretch/Makefile.am @@ -0,0 +1,53 @@ +## Process this file with automake to create Makefile.in +## +## $Id: Makefile.am 43 2008-12-25 17:54:41Z oparviai $ +## +## Copyright (C) 2003 - David W. Durham +## +## This file is part of SoundTouch, an audio processing library for pitch/time adjustments +## +## SoundTouch is free software; you can redistribute it and/or modify it under the +## terms of the GNU General Public License as published by the Free Software +## Foundation; either version 2 of the License, or (at your option) any later +## version. +## +## SoundTouch is distributed in the hope that it will be useful, but WITHOUT ANY +## WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +## A PARTICULAR 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 $(top_srcdir)/config/am_include.mk + + +## bin_PROGRAMS is the macro that tells automake the name of the programs to +## install in the bin directory (/usr/local/bin) by default. By setting +## --prefix= at configure time the user can change this (eg: ./configure +## --prefix=/usr will install soundstretch under /usr/bin/soundstretch ) +bin_PROGRAMS=soundstretch + +noinst_HEADERS=RunParameters.h WavFile.h + +# extra files to include in distrubution tarball +EXTRA_DIST=soundstretch.dsp soundstretch.dsw soundstretch.sln soundstretch.vcproj + +## for every name listed under bin_PROGRAMS, you have a _SOURCES. This lists +## all the sources in the current directory that are used to build soundstretch. +soundstretch_SOURCES=main.cpp RunParameters.cpp WavFile.cpp + +## soundstretch_LDADD is a list of extras to pass at link time. All the objects +## created by the above soundstretch_SOURCES are automatically linked in, so here I +## list object files from other directories as well as flags passed to the +## linker. +soundstretch_LDADD=../SoundTouch/libSoundTouch.la -lm + +## linker flags +soundstretch_LDFLAGS=-s + +## additional compiler flags +soundstretch_CXXFLAGS=-O3 + +#clean-local: +# -rm -f additional-files-to-remove-on-make-clean diff --git a/pysoundtouch/soundtouch/source/SoundStretch/Makefile.in b/pysoundtouch/soundtouch/source/SoundStretch/Makefile.in new file mode 100644 index 0000000..960457c --- /dev/null +++ b/pysoundtouch/soundtouch/source/SoundStretch/Makefile.in @@ -0,0 +1,700 @@ +# Makefile.in generated by automake 1.15 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2014 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = soundstretch$(EXEEXT) +subdir = source/SoundStretch +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/m4/libtool.m4 \ + $(top_srcdir)/config/m4/ltoptions.m4 \ + $(top_srcdir)/config/m4/ltsugar.m4 \ + $(top_srcdir)/config/m4/ltversion.m4 \ + $(top_srcdir)/config/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/soundtouch_config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +PROGRAMS = $(bin_PROGRAMS) +am_soundstretch_OBJECTS = soundstretch-main.$(OBJEXT) \ + soundstretch-RunParameters.$(OBJEXT) \ + soundstretch-WavFile.$(OBJEXT) +soundstretch_OBJECTS = $(am_soundstretch_OBJECTS) +soundstretch_DEPENDENCIES = ../SoundTouch/libSoundTouch.la +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +soundstretch_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(soundstretch_CXXFLAGS) \ + $(CXXFLAGS) $(soundstretch_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = +SOURCES = $(soundstretch_SOURCES) +DIST_SOURCES = $(soundstretch_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +HEADERS = $(noinst_HEADERS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in \ + $(top_srcdir)/config/am_include.mk \ + $(top_srcdir)/config/depcomp +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +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@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +INCLUDES = -I$(top_srcdir)/include + +# doc directory +pkgdocdir = $(prefix)/doc/@PACKAGE@ +noinst_HEADERS = RunParameters.h WavFile.h + +# extra files to include in distrubution tarball +EXTRA_DIST = soundstretch.dsp soundstretch.dsw soundstretch.sln soundstretch.vcproj +soundstretch_SOURCES = main.cpp RunParameters.cpp WavFile.cpp +soundstretch_LDADD = ../SoundTouch/libSoundTouch.la -lm +soundstretch_LDFLAGS = -s +soundstretch_CXXFLAGS = -O3 +all: all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/config/am_include.mk $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign source/SoundStretch/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign source/SoundStretch/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_srcdir)/config/am_include.mk $(am__empty): + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' \ + `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +soundstretch$(EXEEXT): $(soundstretch_OBJECTS) $(soundstretch_DEPENDENCIES) $(EXTRA_soundstretch_DEPENDENCIES) + @rm -f soundstretch$(EXEEXT) + $(AM_V_CXXLD)$(soundstretch_LINK) $(soundstretch_OBJECTS) $(soundstretch_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soundstretch-RunParameters.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soundstretch-WavFile.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soundstretch-main.Po@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< + +soundstretch-main.o: main.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(soundstretch_CXXFLAGS) $(CXXFLAGS) -MT soundstretch-main.o -MD -MP -MF $(DEPDIR)/soundstretch-main.Tpo -c -o soundstretch-main.o `test -f 'main.cpp' || echo '$(srcdir)/'`main.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/soundstretch-main.Tpo $(DEPDIR)/soundstretch-main.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='main.cpp' object='soundstretch-main.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(soundstretch_CXXFLAGS) $(CXXFLAGS) -c -o soundstretch-main.o `test -f 'main.cpp' || echo '$(srcdir)/'`main.cpp + +soundstretch-main.obj: main.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(soundstretch_CXXFLAGS) $(CXXFLAGS) -MT soundstretch-main.obj -MD -MP -MF $(DEPDIR)/soundstretch-main.Tpo -c -o soundstretch-main.obj `if test -f 'main.cpp'; then $(CYGPATH_W) 'main.cpp'; else $(CYGPATH_W) '$(srcdir)/main.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/soundstretch-main.Tpo $(DEPDIR)/soundstretch-main.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='main.cpp' object='soundstretch-main.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(soundstretch_CXXFLAGS) $(CXXFLAGS) -c -o soundstretch-main.obj `if test -f 'main.cpp'; then $(CYGPATH_W) 'main.cpp'; else $(CYGPATH_W) '$(srcdir)/main.cpp'; fi` + +soundstretch-RunParameters.o: RunParameters.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(soundstretch_CXXFLAGS) $(CXXFLAGS) -MT soundstretch-RunParameters.o -MD -MP -MF $(DEPDIR)/soundstretch-RunParameters.Tpo -c -o soundstretch-RunParameters.o `test -f 'RunParameters.cpp' || echo '$(srcdir)/'`RunParameters.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/soundstretch-RunParameters.Tpo $(DEPDIR)/soundstretch-RunParameters.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='RunParameters.cpp' object='soundstretch-RunParameters.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(soundstretch_CXXFLAGS) $(CXXFLAGS) -c -o soundstretch-RunParameters.o `test -f 'RunParameters.cpp' || echo '$(srcdir)/'`RunParameters.cpp + +soundstretch-RunParameters.obj: RunParameters.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(soundstretch_CXXFLAGS) $(CXXFLAGS) -MT soundstretch-RunParameters.obj -MD -MP -MF $(DEPDIR)/soundstretch-RunParameters.Tpo -c -o soundstretch-RunParameters.obj `if test -f 'RunParameters.cpp'; then $(CYGPATH_W) 'RunParameters.cpp'; else $(CYGPATH_W) '$(srcdir)/RunParameters.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/soundstretch-RunParameters.Tpo $(DEPDIR)/soundstretch-RunParameters.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='RunParameters.cpp' object='soundstretch-RunParameters.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(soundstretch_CXXFLAGS) $(CXXFLAGS) -c -o soundstretch-RunParameters.obj `if test -f 'RunParameters.cpp'; then $(CYGPATH_W) 'RunParameters.cpp'; else $(CYGPATH_W) '$(srcdir)/RunParameters.cpp'; fi` + +soundstretch-WavFile.o: WavFile.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(soundstretch_CXXFLAGS) $(CXXFLAGS) -MT soundstretch-WavFile.o -MD -MP -MF $(DEPDIR)/soundstretch-WavFile.Tpo -c -o soundstretch-WavFile.o `test -f 'WavFile.cpp' || echo '$(srcdir)/'`WavFile.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/soundstretch-WavFile.Tpo $(DEPDIR)/soundstretch-WavFile.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='WavFile.cpp' object='soundstretch-WavFile.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(soundstretch_CXXFLAGS) $(CXXFLAGS) -c -o soundstretch-WavFile.o `test -f 'WavFile.cpp' || echo '$(srcdir)/'`WavFile.cpp + +soundstretch-WavFile.obj: WavFile.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(soundstretch_CXXFLAGS) $(CXXFLAGS) -MT soundstretch-WavFile.obj -MD -MP -MF $(DEPDIR)/soundstretch-WavFile.Tpo -c -o soundstretch-WavFile.obj `if test -f 'WavFile.cpp'; then $(CYGPATH_W) 'WavFile.cpp'; else $(CYGPATH_W) '$(srcdir)/WavFile.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/soundstretch-WavFile.Tpo $(DEPDIR)/soundstretch-WavFile.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='WavFile.cpp' object='soundstretch-WavFile.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(soundstretch_CXXFLAGS) $(CXXFLAGS) -c -o soundstretch-WavFile.obj `if test -f 'WavFile.cpp'; then $(CYGPATH_W) 'WavFile.cpp'; else $(CYGPATH_W) '$(srcdir)/WavFile.cpp'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ + clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \ + ctags ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-binPROGRAMS \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am uninstall-binPROGRAMS + +.PRECIOUS: Makefile + + +#clean-local: +# -rm -f additional-files-to-remove-on-make-clean + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/pysoundtouch/soundtouch/source/SoundStretch/RunParameters.cpp b/pysoundtouch/soundtouch/source/SoundStretch/RunParameters.cpp new file mode 100644 index 0000000..76341b3 --- /dev/null +++ b/pysoundtouch/soundtouch/source/SoundStretch/RunParameters.cpp @@ -0,0 +1,302 @@ +//////////////////////////////////////////////////////////////////////////////// +/// +/// A class for parsing the 'soundstretch' application command line parameters +/// +/// Author : Copyright (c) Olli Parviainen +/// Author e-mail : oparviai 'at' iki.fi +/// SoundTouch WWW: http://www.surina.net/soundtouch +/// +//////////////////////////////////////////////////////////////////////////////// +// +// Last changed : $Date: 2009-05-17 19:48:30 +0300 (Sun, 17 May 2009) $ +// File revision : $Revision: 4 $ +// +// $Id: RunParameters.cpp 72 2009-05-17 16:48:30Z oparviai $ +// +//////////////////////////////////////////////////////////////////////////////// +// +// License : +// +// SoundTouch audio processing library +// Copyright (c) Olli Parviainen +// +// 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 library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +//////////////////////////////////////////////////////////////////////////////// + +#include +#include +#include + +#include "RunParameters.h" + +using namespace std; + +// Program usage instructions + +static const char licenseText[] = + " LICENSE:\n" + " ========\n" + " \n" + " SoundTouch sound processing library\n" + " Copyright (c) Olli Parviainen\n" + " \n" + " This library is free software; you can redistribute it and/or\n" + " modify it under the terms of the GNU Lesser General Public\n" + " License version 2.1 as published by the Free Software Foundation.\n" + " \n" + " This library is distributed in the hope that it will be useful,\n" + " but WITHOUT ANY WARRANTY; without even the implied warranty of\n" + " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n" + " Lesser General Public License for more details.\n" + " \n" + " You should have received a copy of the GNU Lesser General Public\n" + " License along with this library; if not, write to the Free Software\n" + " Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n" + " \n" + "This application is distributed with full source codes; however, if you\n" + "didn't receive them, please visit the author's homepage (see the link above)."; + +static const char whatText[] = + "This application processes WAV audio files by modifying the sound tempo,\n" + "pitch and playback rate properties independently from each other.\n" + "\n"; + +static const char usage[] = + "Usage :\n" + " soundstretch infilename outfilename [switches]\n" + "\n" + "To use standard input/output pipes, give 'stdin' and 'stdout' as filenames.\n" + "\n" + "Available switches are:\n" + " -tempo=n : Change sound tempo by n percents (n=-95..+5000 %)\n" + " -pitch=n : Change sound pitch by n semitones (n=-60..+60 semitones)\n" + " -rate=n : Change sound rate by n percents (n=-95..+5000 %)\n" + " -bpm=n : Detect the BPM rate of sound and adjust tempo to meet 'n' BPMs.\n" + " If '=n' is omitted, just detects the BPM rate.\n" + " -quick : Use quicker tempo change algorithm (gain speed, lose quality)\n" + " -naa : Don't use anti-alias filtering (gain speed, lose quality)\n" + " -speech : Tune algorithm for speech processing (default is for music)\n" + " -license : Display the program license text (LGPL)\n"; + + +// Converts a char into lower case +static int _toLowerCase(int c) +{ + if (c >= 'A' && c <= 'Z') + { + c += 'a' - 'A'; + } + return c; +} + + +// Constructor +RunParameters::RunParameters(const int nParams, const char * const paramStr[]) +{ + int i; + int nFirstParam; + + if (nParams < 3) + { + // Too few parameters + if (nParams > 1 && paramStr[1][0] == '-' && + _toLowerCase(paramStr[1][1]) == 'l') + { + // '-license' switch + throwLicense(); + } + string msg = whatText; + msg += usage; + throw runtime_error(msg.c_str()); + } + + inFileName = NULL; + outFileName = NULL; + tempoDelta = 0; + pitchDelta = 0; + rateDelta = 0; + quick = 0; + noAntiAlias = 0; + goalBPM = 0; + speech = FALSE; + detectBPM = FALSE; + + // Get input & output file names + inFileName = (char*)paramStr[1]; + outFileName = (char*)paramStr[2]; + + if (outFileName[0] == '-') + { + // no outputfile name was given but parameters + outFileName = NULL; + nFirstParam = 2; + } + else + { + nFirstParam = 3; + } + + // parse switch parameters + for (i = nFirstParam; i < nParams; i ++) + { + parseSwitchParam(paramStr[i]); + } + + checkLimits(); +} + + + +// Checks parameter limits +void RunParameters::checkLimits() +{ + if (tempoDelta < -95.0f) + { + tempoDelta = -95.0f; + } + else if (tempoDelta > 5000.0f) + { + tempoDelta = 5000.0f; + } + + if (pitchDelta < -60.0f) + { + pitchDelta = -60.0f; + } + else if (pitchDelta > 60.0f) + { + pitchDelta = 60.0f; + } + + if (rateDelta < -95.0f) + { + rateDelta = -95.0f; + } + else if (rateDelta > 5000.0f) + { + rateDelta = 5000.0f; + } +} + + + +// Unknown switch parameter -- throws an exception with an error message +void RunParameters::throwIllegalParamExp(const string &str) const +{ + string msg = "ERROR : Illegal parameter \""; + msg += str; + msg += "\".\n\n"; + msg += usage; + throw runtime_error(msg.c_str()); +} + + + +void RunParameters::throwLicense() const +{ + throw runtime_error(licenseText); +} + + +float RunParameters::parseSwitchValue(const string &str) const +{ + int pos; + + pos = (int)str.find_first_of('='); + if (pos < 0) + { + // '=' missing + throwIllegalParamExp(str); + } + + // Read numerical parameter value after '=' + return (float)atof(str.substr(pos + 1).c_str()); +} + + +// Interprets a single switch parameter string of format "-switch=xx" +// Valid switches are "-tempo=xx", "-pitch=xx" and "-rate=xx". Stores +// switch values into 'params' structure. +void RunParameters::parseSwitchParam(const string &str) +{ + int upS; + + if (str[0] != '-') + { + // leading hyphen missing => not a valid parameter + throwIllegalParamExp(str); + } + + // Take the first character of switch name & change to lower case + upS = _toLowerCase(str[1]); + + // interpret the switch name & operate accordingly + switch (upS) + { + case 't' : + // switch '-tempo=xx' + tempoDelta = parseSwitchValue(str); + break; + + case 'p' : + // switch '-pitch=xx' + pitchDelta = parseSwitchValue(str); + break; + + case 'r' : + // switch '-rate=xx' + rateDelta = parseSwitchValue(str); + break; + + case 'b' : + // switch '-bpm=xx' + detectBPM = TRUE; + try + { + goalBPM = parseSwitchValue(str); + } + catch (const runtime_error) + { + // illegal or missing bpm value => just calculate bpm + goalBPM = 0; + } + break; + + case 'q' : + // switch '-quick' + quick = 1; + break; + + case 'n' : + // switch '-naa' + noAntiAlias = 1; + break; + + case 'l' : + // switch '-license' + throwLicense(); + break; + + case 's' : + // switch '-speech' + speech = TRUE; + break; + + default: + // unknown switch + throwIllegalParamExp(str); + } +} diff --git a/pysoundtouch/soundtouch/source/SoundStretch/RunParameters.h b/pysoundtouch/soundtouch/source/SoundStretch/RunParameters.h new file mode 100644 index 0000000..0f24eb3 --- /dev/null +++ b/pysoundtouch/soundtouch/source/SoundStretch/RunParameters.h @@ -0,0 +1,72 @@ +//////////////////////////////////////////////////////////////////////////////// +/// +/// A class for parsing the 'soundstretch' application command line parameters +/// +/// Author : Copyright (c) Olli Parviainen +/// Author e-mail : oparviai 'at' iki.fi +/// SoundTouch WWW: http://www.surina.net/soundtouch +/// +//////////////////////////////////////////////////////////////////////////////// +// +// Last changed : $Date: 2009-05-17 19:48:30 +0300 (Sun, 17 May 2009) $ +// File revision : $Revision: 4 $ +// +// $Id: RunParameters.h 72 2009-05-17 16:48:30Z oparviai $ +// +//////////////////////////////////////////////////////////////////////////////// +// +// License : +// +// SoundTouch audio processing library +// Copyright (c) Olli Parviainen +// +// 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 library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +//////////////////////////////////////////////////////////////////////////////// + +#ifndef RUNPARAMETERS_H +#define RUNPARAMETERS_H + +#include "STTypes.h" +#include + +using namespace std; + +/// Parses command line parameters into program parameters +class RunParameters +{ +private: + void throwIllegalParamExp(const string &str) const; + void throwLicense() const; + void parseSwitchParam(const string &str); + void checkLimits(); + float parseSwitchValue(const string &str) const; + +public: + char *inFileName; + char *outFileName; + float tempoDelta; + float pitchDelta; + float rateDelta; + int quick; + int noAntiAlias; + float goalBPM; + BOOL detectBPM; + BOOL speech; + + RunParameters(const int nParams, const char * const paramStr[]); +}; + +#endif diff --git a/pysoundtouch/soundtouch/source/SoundStretch/WavFile.cpp b/pysoundtouch/soundtouch/source/SoundStretch/WavFile.cpp new file mode 100644 index 0000000..09d66b2 --- /dev/null +++ b/pysoundtouch/soundtouch/source/SoundStretch/WavFile.cpp @@ -0,0 +1,745 @@ +//////////////////////////////////////////////////////////////////////////////// +/// +/// Classes for easy reading & writing of WAV sound files. +/// +/// For big-endian CPU, define _BIG_ENDIAN_ during compile-time to correctly +/// parse the WAV files with such processors. +/// +/// Admittingly, more complete WAV reader routines may exist in public domain, +/// but the reason for 'yet another' one is that those generic WAV reader +/// libraries are exhaustingly large and cumbersome! Wanted to have something +/// simpler here, i.e. something that's not already larger than rest of the +/// SoundTouch/SoundStretch program... +/// +/// Author : Copyright (c) Olli Parviainen +/// Author e-mail : oparviai 'at' iki.fi +/// SoundTouch WWW: http://www.surina.net/soundtouch +/// +//////////////////////////////////////////////////////////////////////////////// +// +// Last changed : $Date: 2009-02-21 18:00:14 +0200 (Sat, 21 Feb 2009) $ +// File revision : $Revision: 4 $ +// +// $Id: WavFile.cpp 63 2009-02-21 16:00:14Z oparviai $ +// +//////////////////////////////////////////////////////////////////////////////// +// +// License : +// +// SoundTouch audio processing library +// Copyright (c) Olli Parviainen +// +// 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 library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +//////////////////////////////////////////////////////////////////////////////// + +#include +#include +#include +#include +#include +#include + +#include "WavFile.h" + +using namespace std; + +static const char riffStr[] = "RIFF"; +static const char waveStr[] = "WAVE"; +static const char fmtStr[] = "fmt "; +static const char dataStr[] = "data"; + + +////////////////////////////////////////////////////////////////////////////// +// +// Helper functions for swapping byte order to correctly read/write WAV files +// with big-endian CPU's: Define compile-time definition _BIG_ENDIAN_ to +// turn-on the conversion if it appears necessary. +// +// For example, Intel x86 is little-endian and doesn't require conversion, +// while PowerPC of Mac's and many other RISC cpu's are big-endian. + +#ifdef BYTE_ORDER + // In gcc compiler detect the byte order automatically + #if BYTE_ORDER == BIG_ENDIAN + // big-endian platform. + #define _BIG_ENDIAN_ + #endif +#endif + +#ifdef _BIG_ENDIAN_ + // big-endian CPU, swap bytes in 16 & 32 bit words + + // helper-function to swap byte-order of 32bit integer + static inline void _swap32(unsigned int &dwData) + { + dwData = ((dwData >> 24) & 0x000000FF) | + ((dwData >> 8) & 0x0000FF00) | + ((dwData << 8) & 0x00FF0000) | + ((dwData << 24) & 0xFF000000); + } + + // helper-function to swap byte-order of 16bit integer + static inline void _swap16(unsigned short &wData) + { + wData = ((wData >> 8) & 0x00FF) | + ((wData << 8) & 0xFF00); + } + + // helper-function to swap byte-order of buffer of 16bit integers + static inline void _swap16Buffer(unsigned short *pData, unsigned int dwNumWords) + { + unsigned long i; + + for (i = 0; i < dwNumWords; i ++) + { + _swap16(pData[i]); + } + } + +#else // BIG_ENDIAN + // little-endian CPU, WAV file is ok as such + + // dummy helper-function + static inline void _swap32(unsigned int &dwData) + { + // do nothing + } + + // dummy helper-function + static inline void _swap16(unsigned short &wData) + { + // do nothing + } + + // dummy helper-function + static inline void _swap16Buffer(unsigned short *pData, unsigned int dwNumBytes) + { + // do nothing + } + +#endif // BIG_ENDIAN + + +////////////////////////////////////////////////////////////////////////////// +// +// Class WavInFile +// + +WavInFile::WavInFile(const char *fileName) +{ + // Try to open the file for reading + fptr = fopen(fileName, "rb"); + if (fptr == NULL) + { + // didn't succeed + string msg = "Error : Unable to open file \""; + msg += fileName; + msg += "\" for reading."; + throw runtime_error(msg); + } + + init(); +} + + +WavInFile::WavInFile(FILE *file) +{ + // Try to open the file for reading + fptr = file; + if (!file) + { + // didn't succeed + string msg = "Error : Unable to access input stream for reading"; + throw runtime_error(msg); + } + + init(); +} + + +/// Init the WAV file stream +void WavInFile::init() +{ + int hdrsOk; + + // assume file stream is already open + assert(fptr); + + // Read the file headers + hdrsOk = readWavHeaders(); + if (hdrsOk != 0) + { + // Something didn't match in the wav file headers + string msg = "Input file is corrupt or not a WAV file"; + throw runtime_error(msg); + } + + if (header.format.fixed != 1) + { + string msg = "Input file uses unsupported encoding."; + throw runtime_error(msg); + } + + dataRead = 0; +} + + + +WavInFile::~WavInFile() +{ + if (fptr) fclose(fptr); + fptr = NULL; +} + + + +void WavInFile::rewind() +{ + int hdrsOk; + + fseek(fptr, 0, SEEK_SET); + hdrsOk = readWavHeaders(); + assert(hdrsOk == 0); + dataRead = 0; +} + + +int WavInFile::checkCharTags() const +{ + // header.format.fmt should equal to 'fmt ' + if (memcmp(fmtStr, header.format.fmt, 4) != 0) return -1; + // header.data.data_field should equal to 'data' + if (memcmp(dataStr, header.data.data_field, 4) != 0) return -1; + + return 0; +} + + +int WavInFile::read(char *buffer, int maxElems) +{ + int numBytes; + uint afterDataRead; + + // ensure it's 8 bit format + if (header.format.bits_per_sample != 8) + { + throw runtime_error("Error: WavInFile::read(char*, int) works only with 8bit samples."); + } + assert(sizeof(char) == 1); + + numBytes = maxElems; + afterDataRead = dataRead + numBytes; + if (afterDataRead > header.data.data_len) + { + // Don't read more samples than are marked available in header + numBytes = (int)header.data.data_len - (int)dataRead; + assert(numBytes >= 0); + } + + assert(buffer); + numBytes = fread(buffer, 1, numBytes, fptr); + dataRead += numBytes; + + return numBytes; +} + + +int WavInFile::read(short *buffer, int maxElems) +{ + unsigned int afterDataRead; + int numBytes; + int numElems; + + assert(buffer); + if (header.format.bits_per_sample == 8) + { + // 8 bit format + char *temp = new char[maxElems]; + int i; + + numElems = read(temp, maxElems); + // convert from 8 to 16 bit + for (i = 0; i < numElems; i ++) + { + buffer[i] = temp[i] << 8; + } + delete[] temp; + } + else + { + // 16 bit format + assert(header.format.bits_per_sample == 16); + assert(sizeof(short) == 2); + + numBytes = maxElems * 2; + afterDataRead = dataRead + numBytes; + if (afterDataRead > header.data.data_len) + { + // Don't read more samples than are marked available in header + numBytes = (int)header.data.data_len - (int)dataRead; + assert(numBytes >= 0); + } + + numBytes = fread(buffer, 1, numBytes, fptr); + dataRead += numBytes; + numElems = numBytes / 2; + + // 16bit samples, swap byte order if necessary + _swap16Buffer((unsigned short *)buffer, numElems); + } + + return numElems; +} + + + +int WavInFile::read(float *buffer, int maxElems) +{ + short *temp = new short[maxElems]; + int num; + int i; + double fscale; + + num = read(temp, maxElems); + + fscale = 1.0 / 32768.0; + // convert to floats, scale to range [-1..+1[ + for (i = 0; i < num; i ++) + { + buffer[i] = (float)(fscale * (double)temp[i]); + } + + delete[] temp; + + return num; +} + + +int WavInFile::eof() const +{ + // return true if all data has been read or file eof has reached + return (dataRead == header.data.data_len || feof(fptr)); +} + + + +// test if character code is between a white space ' ' and little 'z' +static int isAlpha(char c) +{ + return (c >= ' ' && c <= 'z') ? 1 : 0; +} + + +// test if all characters are between a white space ' ' and little 'z' +static int isAlphaStr(const char *str) +{ + char c; + + c = str[0]; + while (c) + { + if (isAlpha(c) == 0) return 0; + str ++; + c = str[0]; + } + + return 1; +} + + +int WavInFile::readRIFFBlock() +{ + if (fread(&(header.riff), sizeof(WavRiff), 1, fptr) != 1) return -1; + + // swap 32bit data byte order if necessary + _swap32((unsigned int &)header.riff.package_len); + + // header.riff.riff_char should equal to 'RIFF'); + if (memcmp(riffStr, header.riff.riff_char, 4) != 0) return -1; + // header.riff.wave should equal to 'WAVE' + if (memcmp(waveStr, header.riff.wave, 4) != 0) return -1; + + return 0; +} + + + + +int WavInFile::readHeaderBlock() +{ + char label[5]; + string sLabel; + + // lead label string + if (fread(label, 1, 4, fptr) !=4) return -1; + label[4] = 0; + + if (isAlphaStr(label) == 0) return -1; // not a valid label + + // Decode blocks according to their label + if (strcmp(label, fmtStr) == 0) + { + int nLen, nDump; + + // 'fmt ' block + memcpy(header.format.fmt, fmtStr, 4); + + // read length of the format field + if (fread(&nLen, sizeof(int), 1, fptr) != 1) return -1; + // swap byte order if necessary + _swap32((unsigned int &)nLen); // int format_len; + header.format.format_len = nLen; + + // calculate how much length differs from expected + nDump = nLen - ((int)sizeof(header.format) - 8); + + // if format_len is larger than expected, read only as much data as we've space for + if (nDump > 0) + { + nLen = sizeof(header.format) - 8; + } + + // read data + if (fread(&(header.format.fixed), nLen, 1, fptr) != 1) return -1; + + // swap byte order if necessary + _swap16((unsigned short &)header.format.fixed); // short int fixed; + _swap16((unsigned short &)header.format.channel_number); // short int channel_number; + _swap32((unsigned int &)header.format.sample_rate); // int sample_rate; + _swap32((unsigned int &)header.format.byte_rate); // int byte_rate; + _swap16((unsigned short &)header.format.byte_per_sample); // short int byte_per_sample; + _swap16((unsigned short &)header.format.bits_per_sample); // short int bits_per_sample; + + // if format_len is larger than expected, skip the extra data + if (nDump > 0) + { + fseek(fptr, nDump, SEEK_CUR); + } + + return 0; + } + else if (strcmp(label, dataStr) == 0) + { + // 'data' block + memcpy(header.data.data_field, dataStr, 4); + if (fread(&(header.data.data_len), sizeof(uint), 1, fptr) != 1) return -1; + + // swap byte order if necessary + _swap32((unsigned int &)header.data.data_len); + + return 1; + } + else + { + uint len, i; + uint temp; + // unknown block + + // read length + if (fread(&len, sizeof(len), 1, fptr) != 1) return -1; + // scan through the block + for (i = 0; i < len; i ++) + { + if (fread(&temp, 1, 1, fptr) != 1) return -1; + if (feof(fptr)) return -1; // unexpected eof + } + } + return 0; +} + + +int WavInFile::readWavHeaders() +{ + int res; + + memset(&header, 0, sizeof(header)); + + res = readRIFFBlock(); + if (res) return 1; + // read header blocks until data block is found + do + { + // read header blocks + res = readHeaderBlock(); + if (res < 0) return 1; // error in file structure + } while (res == 0); + // check that all required tags are legal + return checkCharTags(); +} + + +uint WavInFile::getNumChannels() const +{ + return header.format.channel_number; +} + + +uint WavInFile::getNumBits() const +{ + return header.format.bits_per_sample; +} + + +uint WavInFile::getBytesPerSample() const +{ + return getNumChannels() * getNumBits() / 8; +} + + +uint WavInFile::getSampleRate() const +{ + return header.format.sample_rate; +} + + + +uint WavInFile::getDataSizeInBytes() const +{ + return header.data.data_len; +} + + +uint WavInFile::getNumSamples() const +{ + if (header.format.byte_per_sample == 0) return 0; + return header.data.data_len / (unsigned short)header.format.byte_per_sample; +} + + +uint WavInFile::getLengthMS() const +{ + uint numSamples; + uint sampleRate; + + numSamples = getNumSamples(); + sampleRate = getSampleRate(); + + assert(numSamples < UINT_MAX / 1000); + return (1000 * numSamples / sampleRate); +} + + +////////////////////////////////////////////////////////////////////////////// +// +// Class WavOutFile +// + +WavOutFile::WavOutFile(const char *fileName, int sampleRate, int bits, int channels) +{ + bytesWritten = 0; + fptr = fopen(fileName, "wb"); + if (fptr == NULL) + { + string msg = "Error : Unable to open file \""; + msg += fileName; + msg += "\" for writing."; + //pmsg = msg.c_str; + throw runtime_error(msg); + } + + fillInHeader(sampleRate, bits, channels); + writeHeader(); +} + + +WavOutFile::WavOutFile(FILE *file, int sampleRate, int bits, int channels) +{ + bytesWritten = 0; + fptr = file; + if (fptr == NULL) + { + string msg = "Error : Unable to access output file stream."; + throw runtime_error(msg); + } + + fillInHeader(sampleRate, bits, channels); + writeHeader(); +} + + + +WavOutFile::~WavOutFile() +{ + finishHeader(); + if (fptr) fclose(fptr); + fptr = NULL; +} + + + +void WavOutFile::fillInHeader(uint sampleRate, uint bits, uint channels) +{ + // fill in the 'riff' part.. + + // copy string 'RIFF' to riff_char + memcpy(&(header.riff.riff_char), riffStr, 4); + // package_len unknown so far + header.riff.package_len = 0; + // copy string 'WAVE' to wave + memcpy(&(header.riff.wave), waveStr, 4); + + + // fill in the 'format' part.. + + // copy string 'fmt ' to fmt + memcpy(&(header.format.fmt), fmtStr, 4); + + header.format.format_len = 0x10; + header.format.fixed = 1; + header.format.channel_number = (short)channels; + header.format.sample_rate = (int)sampleRate; + header.format.bits_per_sample = (short)bits; + header.format.byte_per_sample = (short)(bits * channels / 8); + header.format.byte_rate = header.format.byte_per_sample * (int)sampleRate; + header.format.sample_rate = (int)sampleRate; + + // fill in the 'data' part.. + + // copy string 'data' to data_field + memcpy(&(header.data.data_field), dataStr, 4); + // data_len unknown so far + header.data.data_len = 0; +} + + +void WavOutFile::finishHeader() +{ + // supplement the file length into the header structure + header.riff.package_len = bytesWritten + 36; + header.data.data_len = bytesWritten; + + writeHeader(); +} + + + +void WavOutFile::writeHeader() +{ + WavHeader hdrTemp; + int res; + + // swap byte order if necessary + hdrTemp = header; + _swap32((unsigned int &)hdrTemp.riff.package_len); + _swap32((unsigned int &)hdrTemp.format.format_len); + _swap16((unsigned short &)hdrTemp.format.fixed); + _swap16((unsigned short &)hdrTemp.format.channel_number); + _swap32((unsigned int &)hdrTemp.format.sample_rate); + _swap32((unsigned int &)hdrTemp.format.byte_rate); + _swap16((unsigned short &)hdrTemp.format.byte_per_sample); + _swap16((unsigned short &)hdrTemp.format.bits_per_sample); + _swap32((unsigned int &)hdrTemp.data.data_len); + + // write the supplemented header in the beginning of the file + fseek(fptr, 0, SEEK_SET); + res = fwrite(&hdrTemp, sizeof(hdrTemp), 1, fptr); + if (res != 1) + { + throw runtime_error("Error while writing to a wav file."); + } + + // jump back to the end of the file + fseek(fptr, 0, SEEK_END); +} + + + +void WavOutFile::write(const char *buffer, int numElems) +{ + int res; + + if (header.format.bits_per_sample != 8) + { + throw runtime_error("Error: WavOutFile::write(const char*, int) accepts only 8bit samples."); + } + assert(sizeof(char) == 1); + + res = fwrite(buffer, 1, numElems, fptr); + if (res != numElems) + { + throw runtime_error("Error while writing to a wav file."); + } + + bytesWritten += numElems; +} + + +void WavOutFile::write(const short *buffer, int numElems) +{ + int res; + + // 16 bit samples + if (numElems < 1) return; // nothing to do + + if (header.format.bits_per_sample == 8) + { + int i; + char *temp = new char[numElems]; + // convert from 16bit format to 8bit format + for (i = 0; i < numElems; i ++) + { + temp[i] = buffer[i] >> 8; + } + // write in 8bit format + write(temp, numElems); + delete[] temp; + } + else + { + // 16bit format + unsigned short *pTemp = new unsigned short[numElems]; + + assert(header.format.bits_per_sample == 16); + + // allocate temp buffer to swap byte order if necessary + memcpy(pTemp, buffer, numElems * 2); + _swap16Buffer(pTemp, numElems); + + res = fwrite(pTemp, 2, numElems, fptr); + + delete[] pTemp; + + if (res != numElems) + { + throw runtime_error("Error while writing to a wav file."); + } + bytesWritten += 2 * numElems; + } +} + + +void WavOutFile::write(const float *buffer, int numElems) +{ + int i; + short *temp = new short[numElems]; + int iTemp; + + // convert to 16 bit integer + for (i = 0; i < numElems; i ++) + { + // convert to integer + iTemp = (int)(32768.0f * buffer[i]); + + // saturate + if (iTemp < -32768) iTemp = -32768; + if (iTemp > 32767) iTemp = 32767; + temp[i] = (short)iTemp; + } + + write(temp, numElems); + + delete[] temp; +} diff --git a/pysoundtouch/soundtouch/source/SoundStretch/WavFile.h b/pysoundtouch/soundtouch/source/SoundStretch/WavFile.h new file mode 100644 index 0000000..8effe17 --- /dev/null +++ b/pysoundtouch/soundtouch/source/SoundStretch/WavFile.h @@ -0,0 +1,250 @@ +//////////////////////////////////////////////////////////////////////////////// +/// +/// Classes for easy reading & writing of WAV sound files. +/// +/// For big-endian CPU, define BIG_ENDIAN during compile-time to correctly +/// parse the WAV files with such processors. +/// +/// Admittingly, more complete WAV reader routines may exist in public domain, but +/// the reason for 'yet another' one is that those generic WAV reader libraries are +/// exhaustingly large and cumbersome! Wanted to have something simpler here, i.e. +/// something that's not already larger than rest of the SoundTouch/SoundStretch program... +/// +/// Author : Copyright (c) Olli Parviainen +/// Author e-mail : oparviai 'at' iki.fi +/// SoundTouch WWW: http://www.surina.net/soundtouch +/// +//////////////////////////////////////////////////////////////////////////////// +// +// Last changed : $Date: 2009-02-21 18:00:14 +0200 (Sat, 21 Feb 2009) $ +// File revision : $Revision: 4 $ +// +// $Id: WavFile.h 63 2009-02-21 16:00:14Z oparviai $ +// +//////////////////////////////////////////////////////////////////////////////// +// +// License : +// +// SoundTouch audio processing library +// Copyright (c) Olli Parviainen +// +// 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 library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +//////////////////////////////////////////////////////////////////////////////// + +#ifndef WAVFILE_H +#define WAVFILE_H + +#include + +#ifndef uint +typedef unsigned int uint; +#endif + + +/// WAV audio file 'riff' section header +typedef struct +{ + char riff_char[4]; + int package_len; + char wave[4]; +} WavRiff; + +/// WAV audio file 'format' section header +typedef struct +{ + char fmt[4]; + int format_len; + short fixed; + short channel_number; + int sample_rate; + int byte_rate; + short byte_per_sample; + short bits_per_sample; +} WavFormat; + +/// WAV audio file 'data' section header +typedef struct +{ + char data_field[4]; + uint data_len; +} WavData; + + +/// WAV audio file header +typedef struct +{ + WavRiff riff; + WavFormat format; + WavData data; +} WavHeader; + + +/// Class for reading WAV audio files. +class WavInFile +{ +private: + /// File pointer. + FILE *fptr; + + /// Counter of how many bytes of sample data have been read from the file. + uint dataRead; + + /// WAV header information + WavHeader header; + + /// Init the WAV file stream + void init(); + + /// Read WAV file headers. + /// \return zero if all ok, nonzero if file format is invalid. + int readWavHeaders(); + + /// Checks WAV file header tags. + /// \return zero if all ok, nonzero if file format is invalid. + int checkCharTags() const; + + /// Reads a single WAV file header block. + /// \return zero if all ok, nonzero if file format is invalid. + int readHeaderBlock(); + + /// Reads WAV file 'riff' block + int readRIFFBlock(); + +public: + /// Constructor: Opens the given WAV file. If the file can't be opened, + /// throws 'runtime_error' exception. + WavInFile(const char *filename); + + WavInFile(FILE *file); + + /// Destructor: Closes the file. + ~WavInFile(); + + /// Rewind to beginning of the file + void rewind(); + + /// Get sample rate. + uint getSampleRate() const; + + /// Get number of bits per sample, i.e. 8 or 16. + uint getNumBits() const; + + /// Get sample data size in bytes. Ahem, this should return same information as + /// 'getBytesPerSample'... + uint getDataSizeInBytes() const; + + /// Get total number of samples in file. + uint getNumSamples() const; + + /// Get number of bytes per audio sample (e.g. 16bit stereo = 4 bytes/sample) + uint getBytesPerSample() const; + + /// Get number of audio channels in the file (1=mono, 2=stereo) + uint getNumChannels() const; + + /// Get the audio file length in milliseconds + uint getLengthMS() const; + + /// Reads audio samples from the WAV file. This routine works only for 8 bit samples. + /// Reads given number of elements from the file or if end-of-file reached, as many + /// elements as are left in the file. + /// + /// \return Number of 8-bit integers read from the file. + int read(char *buffer, int maxElems); + + /// Reads audio samples from the WAV file to 16 bit integer format. Reads given number + /// of elements from the file or if end-of-file reached, as many elements as are + /// left in the file. + /// + /// \return Number of 16-bit integers read from the file. + int read(short *buffer, ///< Pointer to buffer where to read data. + int maxElems ///< Size of 'buffer' array (number of array elements). + ); + + /// Reads audio samples from the WAV file to floating point format, converting + /// sample values to range [-1,1[. Reads given number of elements from the file + /// or if end-of-file reached, as many elements as are left in the file. + /// + /// \return Number of elements read from the file. + int read(float *buffer, ///< Pointer to buffer where to read data. + int maxElems ///< Size of 'buffer' array (number of array elements). + ); + + /// Check end-of-file. + /// + /// \return Nonzero if end-of-file reached. + int eof() const; +}; + + + +/// Class for writing WAV audio files. +class WavOutFile +{ +private: + /// Pointer to the WAV file + FILE *fptr; + + /// WAV file header data. + WavHeader header; + + /// Counter of how many bytes have been written to the file so far. + int bytesWritten; + + /// Fills in WAV file header information. + void fillInHeader(const uint sampleRate, const uint bits, const uint channels); + + /// Finishes the WAV file header by supplementing information of amount of + /// data written to file etc + void finishHeader(); + + /// Writes the WAV file header. + void writeHeader(); + +public: + /// Constructor: Creates a new WAV file. Throws a 'runtime_error' exception + /// if file creation fails. + WavOutFile(const char *fileName, ///< Filename + int sampleRate, ///< Sample rate (e.g. 44100 etc) + int bits, ///< Bits per sample (8 or 16 bits) + int channels ///< Number of channels (1=mono, 2=stereo) + ); + + WavOutFile(FILE *file, int sampleRate, int bits, int channels); + + /// Destructor: Finalizes & closes the WAV file. + ~WavOutFile(); + + /// Write data to WAV file. This function works only with 8bit samples. + /// Throws a 'runtime_error' exception if writing to file fails. + void write(const char *buffer, ///< Pointer to sample data buffer. + int numElems ///< How many array items are to be written to file. + ); + + /// Write data to WAV file. Throws a 'runtime_error' exception if writing to + /// file fails. + void write(const short *buffer, ///< Pointer to sample data buffer. + int numElems ///< How many array items are to be written to file. + ); + + /// Write data to WAV file in floating point format, saturating sample values to range + /// [-1..+1[. Throws a 'runtime_error' exception if writing to file fails. + void write(const float *buffer, ///< Pointer to sample data buffer. + int numElems ///< How many array items are to be written to file. + ); +}; + +#endif diff --git a/pysoundtouch/soundtouch/source/SoundStretch/main.cpp b/pysoundtouch/soundtouch/source/SoundStretch/main.cpp new file mode 100644 index 0000000..b2237e7 --- /dev/null +++ b/pysoundtouch/soundtouch/source/SoundStretch/main.cpp @@ -0,0 +1,330 @@ +//////////////////////////////////////////////////////////////////////////////// +/// +/// SoundStretch main routine. +/// +/// Author : Copyright (c) Olli Parviainen +/// Author e-mail : oparviai 'at' iki.fi +/// SoundTouch WWW: http://www.surina.net/soundtouch +/// +//////////////////////////////////////////////////////////////////////////////// +// +// Last changed : $Date: 2009-12-28 22:32:10 +0200 (Mon, 28 Dec 2009) $ +// File revision : $Revision: 4 $ +// +// $Id: main.cpp 79 2009-12-28 20:32:10Z oparviai $ +// +//////////////////////////////////////////////////////////////////////////////// +// +// License : +// +// SoundTouch audio processing library +// Copyright (c) Olli Parviainen +// +// 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 library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +//////////////////////////////////////////////////////////////////////////////// + +#include +#include +#include +#include "RunParameters.h" +#include "WavFile.h" +#include "SoundTouch.h" +#include "BPMDetect.h" + +using namespace soundtouch; +using namespace std; + +// Processing chunk size +#define BUFF_SIZE 2048 + +#if WIN32 + #include + #include + + // Macro for Win32 standard input/output stream support: Sets a file stream into binary mode + #define SET_STREAM_TO_BIN_MODE(f) (_setmode(fileno(f), _O_BINARY)) +#else + // Not needed for GNU environment... + #define SET_STREAM_TO_BIN_MODE(f) {} +#endif + + +static const char _helloText[] = + "\n" + " SoundStretch v%s - Written by Olli Parviainen 2001 - 2009\n" + "==================================================================\n" + "author e-mail: - WWW: http://www.surina.net/soundtouch\n" + "\n" + "This program is subject to (L)GPL license. Run \"soundstretch -license\" for\n" + "more information.\n" + "\n"; + +static void openFiles(WavInFile **inFile, WavOutFile **outFile, const RunParameters *params) +{ + int bits, samplerate, channels; + + if (strcmp(params->inFileName, "stdin") == 0) + { + // used 'stdin' as input file + SET_STREAM_TO_BIN_MODE(stdin); + *inFile = new WavInFile(stdin); + } + else + { + // open input file... + *inFile = new WavInFile(params->inFileName); + } + + // ... open output file with same sound parameters + bits = (int)(*inFile)->getNumBits(); + samplerate = (int)(*inFile)->getSampleRate(); + channels = (int)(*inFile)->getNumChannels(); + + if (params->outFileName) + { + if (strcmp(params->outFileName, "stdout") == 0) + { + SET_STREAM_TO_BIN_MODE(stdout); + *outFile = new WavOutFile(stdout, samplerate, bits, channels); + } + else + { + *outFile = new WavOutFile(params->outFileName, samplerate, bits, channels); + } + } + else + { + *outFile = NULL; + } +} + + + +// Sets the 'SoundTouch' object up according to input file sound format & +// command line parameters +static void setup(SoundTouch *pSoundTouch, const WavInFile *inFile, const RunParameters *params) +{ + int sampleRate; + int channels; + + sampleRate = (int)inFile->getSampleRate(); + channels = (int)inFile->getNumChannels(); + pSoundTouch->setSampleRate(sampleRate); + pSoundTouch->setChannels(channels); + + pSoundTouch->setTempoChange(params->tempoDelta); + pSoundTouch->setPitchSemiTones(params->pitchDelta); + pSoundTouch->setRateChange(params->rateDelta); + + pSoundTouch->setSetting(SETTING_USE_QUICKSEEK, params->quick); + pSoundTouch->setSetting(SETTING_USE_AA_FILTER, !(params->noAntiAlias)); + + if (params->speech) + { + // use settings for speech processing + pSoundTouch->setSetting(SETTING_SEQUENCE_MS, 40); + pSoundTouch->setSetting(SETTING_SEEKWINDOW_MS, 15); + pSoundTouch->setSetting(SETTING_OVERLAP_MS, 8); + fprintf(stderr, "Tune processing parameters for speech processing.\n"); + } + + // print processing information + if (params->outFileName) + { +#ifdef INTEGER_SAMPLES + fprintf(stderr, "Uses 16bit integer sample type in processing.\n\n"); +#else + #ifndef FLOAT_SAMPLES + #error "Sampletype not defined" + #endif + fprintf(stderr, "Uses 32bit floating point sample type in processing.\n\n"); +#endif + // print processing information only if outFileName given i.e. some processing will happen + fprintf(stderr, "Processing the file with the following changes:\n"); + fprintf(stderr, " tempo change = %+g %%\n", params->tempoDelta); + fprintf(stderr, " pitch change = %+g semitones\n", params->pitchDelta); + fprintf(stderr, " rate change = %+g %%\n\n", params->rateDelta); + fprintf(stderr, "Working..."); + } + else + { + // outFileName not given + fprintf(stderr, "Warning: output file name missing, won't output anything.\n\n"); + } + + fflush(stderr); +} + + + + +// Processes the sound +static void process(SoundTouch *pSoundTouch, WavInFile *inFile, WavOutFile *outFile) +{ + int nSamples; + int nChannels; + int buffSizeSamples; + SAMPLETYPE sampleBuffer[BUFF_SIZE]; + + if ((inFile == NULL) || (outFile == NULL)) return; // nothing to do. + + nChannels = (int)inFile->getNumChannels(); + assert(nChannels > 0); + buffSizeSamples = BUFF_SIZE / nChannels; + + // Process samples read from the input file + while (inFile->eof() == 0) + { + int num; + + // Read a chunk of samples from the input file + num = inFile->read(sampleBuffer, BUFF_SIZE); + nSamples = num / (int)inFile->getNumChannels(); + + // Feed the samples into SoundTouch processor + pSoundTouch->putSamples(sampleBuffer, nSamples); + + // Read ready samples from SoundTouch processor & write them output file. + // NOTES: + // - 'receiveSamples' doesn't necessarily return any samples at all + // during some rounds! + // - On the other hand, during some round 'receiveSamples' may have more + // ready samples than would fit into 'sampleBuffer', and for this reason + // the 'receiveSamples' call is iterated for as many times as it + // outputs samples. + do + { + nSamples = pSoundTouch->receiveSamples(sampleBuffer, buffSizeSamples); + outFile->write(sampleBuffer, nSamples * nChannels); + } while (nSamples != 0); + } + + // Now the input file is processed, yet 'flush' few last samples that are + // hiding in the SoundTouch's internal processing pipeline. + pSoundTouch->flush(); + do + { + nSamples = pSoundTouch->receiveSamples(sampleBuffer, buffSizeSamples); + outFile->write(sampleBuffer, nSamples * nChannels); + } while (nSamples != 0); +} + + + +// Detect BPM rate of inFile and adjust tempo setting accordingly if necessary +static void detectBPM(WavInFile *inFile, RunParameters *params) +{ + float bpmValue; + int nChannels; + BPMDetect bpm(inFile->getNumChannels(), inFile->getSampleRate()); + SAMPLETYPE sampleBuffer[BUFF_SIZE]; + + // detect bpm rate + fprintf(stderr, "Detecting BPM rate..."); + fflush(stderr); + + nChannels = (int)inFile->getNumChannels(); + assert(BUFF_SIZE % nChannels == 0); + + // Process the 'inFile' in small blocks, repeat until whole file has + // been processed + while (inFile->eof() == 0) + { + int num, samples; + + // Read sample data from input file + num = inFile->read(sampleBuffer, BUFF_SIZE); + + // Enter the new samples to the bpm analyzer class + samples = num / nChannels; + bpm.inputSamples(sampleBuffer, samples); + } + + // Now the whole song data has been analyzed. Read the resulting bpm. + bpmValue = bpm.getBpm(); + fprintf(stderr, "Done!\n"); + + // rewind the file after bpm detection + inFile->rewind(); + + if (bpmValue > 0) + { + fprintf(stderr, "Detected BPM rate %.1f\n\n", bpmValue); + } + else + { + fprintf(stderr, "Couldn't detect BPM rate.\n\n"); + return; + } + + if (params->goalBPM > 0) + { + // adjust tempo to given bpm + params->tempoDelta = (params->goalBPM / bpmValue - 1.0f) * 100.0f; + fprintf(stderr, "The file will be converted to %.1f BPM\n\n", params->goalBPM); + } +} + + + +int main(const int nParams, const char * const paramStr[]) +{ + WavInFile *inFile; + WavOutFile *outFile; + RunParameters *params; + SoundTouch soundTouch; + + fprintf(stderr, _helloText, SoundTouch::getVersionString()); + + try + { + // Parse command line parameters + params = new RunParameters(nParams, paramStr); + + // Open input & output files + openFiles(&inFile, &outFile, params); + + if (params->detectBPM == TRUE) + { + // detect sound BPM (and adjust processing parameters + // accordingly if necessary) + detectBPM(inFile, params); + } + + // Setup the 'SoundTouch' object for processing the sound + setup(&soundTouch, inFile, params); + + // Process the sound + process(&soundTouch, inFile, outFile); + + // Close WAV file handles & dispose of the objects + delete inFile; + delete outFile; + delete params; + + fprintf(stderr, "Done!\n"); + } + catch (const runtime_error &e) + { + // An exception occurred during processing, display an error message + fprintf(stderr, "%s\n", e.what()); + return -1; + } + + return 0; +} diff --git a/pysoundtouch/soundtouch/source/SoundStretch/soundstretch b/pysoundtouch/soundtouch/source/SoundStretch/soundstretch new file mode 100755 index 0000000..93caebe Binary files /dev/null and b/pysoundtouch/soundtouch/source/SoundStretch/soundstretch differ diff --git a/pysoundtouch/soundtouch/source/SoundStretch/soundstretch.dsp b/pysoundtouch/soundtouch/source/SoundStretch/soundstretch.dsp new file mode 100644 index 0000000..81b2dfa --- /dev/null +++ b/pysoundtouch/soundtouch/source/SoundStretch/soundstretch.dsp @@ -0,0 +1,137 @@ +# Microsoft Developer Studio Project File - Name="soundstretch" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=soundstretch - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "soundstretch.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "soundstretch.mak" CFG="soundstretch - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "soundstretch - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "soundstretch - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "soundstretch - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /Zi /O2 /I "..\..\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x40b /d "NDEBUG" +# ADD RSC /l 0x40b /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 SoundTouch.lib /nologo /subsystem:console /profile /map /debug /machine:I386 /libpath:"..\..\lib" +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Cmds=copy Release\soundstretch.exe ..\..\bin\ +# End Special Build Tool + +!ELSEIF "$(CFG)" == "soundstretch - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /Zp16 /W3 /Gm /GX /ZI /Od /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /FD /GZ /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x40b /d "_DEBUG" +# ADD RSC /l 0x40b /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 SoundTouchD.lib /nologo /subsystem:console /map /debug /machine:I386 /nodefaultlib:"libc" /out:"Debug/soundstretchD.exe" /pdbtype:sept /libpath:"..\..\lib" +# SUBTRACT LINK32 /pdb:none +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Cmds=copy Debug\soundstretchD.exe ..\..\bin\ +# End Special Build Tool + +!ENDIF + +# Begin Target + +# Name "soundstretch - Win32 Release" +# Name "soundstretch - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\main.cpp +# End Source File +# Begin Source File + +SOURCE=.\RunParameters.cpp +# End Source File +# Begin Source File + +SOURCE=.\WavFile.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\RunParameters.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\include\SoundTouch.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\include\STTypes.h +# End Source File +# Begin Source File + +SOURCE=.\WavFile.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/pysoundtouch/soundtouch/source/SoundStretch/soundstretch.dsw b/pysoundtouch/soundtouch/source/SoundStretch/soundstretch.dsw new file mode 100644 index 0000000..36ced4b --- /dev/null +++ b/pysoundtouch/soundtouch/source/SoundStretch/soundstretch.dsw @@ -0,0 +1,44 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "SoundTouch"=..\SoundTouch\SoundTouch.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "soundstretch"=.\soundstretch.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name SoundTouch + End Project Dependency +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/pysoundtouch/soundtouch/source/SoundStretch/soundstretch.sln b/pysoundtouch/soundtouch/source/SoundStretch/soundstretch.sln new file mode 100644 index 0000000..dfdc4ac --- /dev/null +++ b/pysoundtouch/soundtouch/source/SoundStretch/soundstretch.sln @@ -0,0 +1,32 @@ +Microsoft Visual Studio Solution File, Format Version 8.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "soundstretch", "soundstretch.vcproj", "{5AACDFFA-D491-44B8-A332-DA7ACCAAF2AF}" + ProjectSection(ProjectDependencies) = postProject + {68A5DD20-7057-448B-8FE0-B6AC8D205509} = {68A5DD20-7057-448B-8FE0-B6AC8D205509} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SoundTouch", "..\SoundTouch\SoundTouch.vcproj", "{68A5DD20-7057-448B-8FE0-B6AC8D205509}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + Debug = Debug + Release = Release + EndGlobalSection + GlobalSection(ProjectDependencies) = postSolution + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {5AACDFFA-D491-44B8-A332-DA7ACCAAF2AF}.Debug.ActiveCfg = Debug|Win32 + {5AACDFFA-D491-44B8-A332-DA7ACCAAF2AF}.Debug.Build.0 = Debug|Win32 + {5AACDFFA-D491-44B8-A332-DA7ACCAAF2AF}.Release.ActiveCfg = Release|Win32 + {5AACDFFA-D491-44B8-A332-DA7ACCAAF2AF}.Release.Build.0 = Release|Win32 + {68A5DD20-7057-448B-8FE0-B6AC8D205509}.Debug.ActiveCfg = Debug|Win32 + {68A5DD20-7057-448B-8FE0-B6AC8D205509}.Debug.Build.0 = Debug|Win32 + {68A5DD20-7057-448B-8FE0-B6AC8D205509}.Release.ActiveCfg = Release|Win32 + {68A5DD20-7057-448B-8FE0-B6AC8D205509}.Release.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/pysoundtouch/soundtouch/source/SoundStretch/soundstretch.vcproj b/pysoundtouch/soundtouch/source/SoundStretch/soundstretch.vcproj new file mode 100644 index 0000000..b1f66be --- /dev/null +++ b/pysoundtouch/soundtouch/source/SoundStretch/soundstretch.vcproj @@ -0,0 +1,233 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pysoundtouch/soundtouch/source/SoundTouch/.deps/AAFilter.Plo b/pysoundtouch/soundtouch/source/SoundTouch/.deps/AAFilter.Plo new file mode 100644 index 0000000..326e580 --- /dev/null +++ b/pysoundtouch/soundtouch/source/SoundTouch/.deps/AAFilter.Plo @@ -0,0 +1,109 @@ +AAFilter.lo: AAFilter.cpp /usr/include/stdc-predef.h \ + /usr/include/memory.h /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \ + /usr/include/gnu/stubs-64.h /usr/include/string.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/include/stddef.h \ + /usr/include/xlocale.h /usr/include/assert.h /usr/include/math.h \ + /usr/include/bits/huge_val.h /usr/include/bits/huge_valf.h \ + /usr/include/bits/huge_vall.h /usr/include/bits/inf.h \ + /usr/include/bits/nan.h /usr/include/bits/mathdef.h \ + /usr/include/bits/mathcalls.h /usr/include/bits/mathinline.h \ + /usr/include/stdlib.h /usr/include/bits/waitflags.h \ + /usr/include/bits/waitstatus.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/bits/byteswap.h \ + /usr/include/bits/types.h /usr/include/bits/typesizes.h \ + /usr/include/bits/byteswap-16.h /usr/include/sys/types.h \ + /usr/include/time.h /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/bits/time.h \ + /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \ + /usr/include/alloca.h /usr/include/bits/stdlib-bsearch.h \ + /usr/include/bits/stdlib-float.h AAFilter.h ../../include/STTypes.h \ + ../../include/soundtouch_config.h FIRFilter.h + +/usr/include/stdc-predef.h: + +/usr/include/memory.h: + +/usr/include/features.h: + +/usr/include/sys/cdefs.h: + +/usr/include/bits/wordsize.h: + +/usr/include/gnu/stubs.h: + +/usr/include/gnu/stubs-64.h: + +/usr/include/string.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/include/stddef.h: + +/usr/include/xlocale.h: + +/usr/include/assert.h: + +/usr/include/math.h: + +/usr/include/bits/huge_val.h: + +/usr/include/bits/huge_valf.h: + +/usr/include/bits/huge_vall.h: + +/usr/include/bits/inf.h: + +/usr/include/bits/nan.h: + +/usr/include/bits/mathdef.h: + +/usr/include/bits/mathcalls.h: + +/usr/include/bits/mathinline.h: + +/usr/include/stdlib.h: + +/usr/include/bits/waitflags.h: + +/usr/include/bits/waitstatus.h: + +/usr/include/endian.h: + +/usr/include/bits/endian.h: + +/usr/include/bits/byteswap.h: + +/usr/include/bits/types.h: + +/usr/include/bits/typesizes.h: + +/usr/include/bits/byteswap-16.h: + +/usr/include/sys/types.h: + +/usr/include/time.h: + +/usr/include/sys/select.h: + +/usr/include/bits/select.h: + +/usr/include/bits/sigset.h: + +/usr/include/bits/time.h: + +/usr/include/sys/sysmacros.h: + +/usr/include/bits/pthreadtypes.h: + +/usr/include/alloca.h: + +/usr/include/bits/stdlib-bsearch.h: + +/usr/include/bits/stdlib-float.h: + +AAFilter.h: + +../../include/STTypes.h: + +../../include/soundtouch_config.h: + +FIRFilter.h: diff --git a/pysoundtouch/soundtouch/source/SoundTouch/.deps/BPMDetect.Plo b/pysoundtouch/soundtouch/source/SoundTouch/.deps/BPMDetect.Plo new file mode 100644 index 0000000..986dd70 --- /dev/null +++ b/pysoundtouch/soundtouch/source/SoundTouch/.deps/BPMDetect.Plo @@ -0,0 +1,135 @@ +BPMDetect.lo: BPMDetect.cpp /usr/include/stdc-predef.h \ + /usr/include/math.h /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \ + /usr/include/gnu/stubs-64.h /usr/include/bits/huge_val.h \ + /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \ + /usr/include/bits/inf.h /usr/include/bits/nan.h \ + /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \ + /usr/include/bits/mathinline.h /usr/include/assert.h \ + /usr/include/string.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/include/stddef.h \ + /usr/include/xlocale.h /usr/include/stdio.h /usr/include/bits/types.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/bits/stdio.h ../../include/FIFOSampleBuffer.h \ + ../../include/FIFOSamplePipe.h /usr/include/stdlib.h \ + /usr/include/bits/waitflags.h /usr/include/bits/waitstatus.h \ + /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/bits/byteswap.h /usr/include/bits/byteswap-16.h \ + /usr/include/sys/types.h /usr/include/time.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/bits/time.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/alloca.h \ + /usr/include/bits/stdlib-bsearch.h /usr/include/bits/stdlib-float.h \ + ../../include/STTypes.h ../../include/soundtouch_config.h PeakFinder.h \ + ../../include/BPMDetect.h ../../include/FIFOSampleBuffer.h + +/usr/include/stdc-predef.h: + +/usr/include/math.h: + +/usr/include/features.h: + +/usr/include/sys/cdefs.h: + +/usr/include/bits/wordsize.h: + +/usr/include/gnu/stubs.h: + +/usr/include/gnu/stubs-64.h: + +/usr/include/bits/huge_val.h: + +/usr/include/bits/huge_valf.h: + +/usr/include/bits/huge_vall.h: + +/usr/include/bits/inf.h: + +/usr/include/bits/nan.h: + +/usr/include/bits/mathdef.h: + +/usr/include/bits/mathcalls.h: + +/usr/include/bits/mathinline.h: + +/usr/include/assert.h: + +/usr/include/string.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/include/stddef.h: + +/usr/include/xlocale.h: + +/usr/include/stdio.h: + +/usr/include/bits/types.h: + +/usr/include/bits/typesizes.h: + +/usr/include/libio.h: + +/usr/include/_G_config.h: + +/usr/include/wchar.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/include/stdarg.h: + +/usr/include/bits/stdio_lim.h: + +/usr/include/bits/sys_errlist.h: + +/usr/include/bits/stdio.h: + +../../include/FIFOSampleBuffer.h: + +../../include/FIFOSamplePipe.h: + +/usr/include/stdlib.h: + +/usr/include/bits/waitflags.h: + +/usr/include/bits/waitstatus.h: + +/usr/include/endian.h: + +/usr/include/bits/endian.h: + +/usr/include/bits/byteswap.h: + +/usr/include/bits/byteswap-16.h: + +/usr/include/sys/types.h: + +/usr/include/time.h: + +/usr/include/sys/select.h: + +/usr/include/bits/select.h: + +/usr/include/bits/sigset.h: + +/usr/include/bits/time.h: + +/usr/include/sys/sysmacros.h: + +/usr/include/bits/pthreadtypes.h: + +/usr/include/alloca.h: + +/usr/include/bits/stdlib-bsearch.h: + +/usr/include/bits/stdlib-float.h: + +../../include/STTypes.h: + +../../include/soundtouch_config.h: + +PeakFinder.h: + +../../include/BPMDetect.h: + +../../include/FIFOSampleBuffer.h: diff --git a/pysoundtouch/soundtouch/source/SoundTouch/.deps/FIFOSampleBuffer.Plo b/pysoundtouch/soundtouch/source/SoundTouch/.deps/FIFOSampleBuffer.Plo new file mode 100644 index 0000000..c3b1ac1 --- /dev/null +++ b/pysoundtouch/soundtouch/source/SoundTouch/.deps/FIFOSampleBuffer.Plo @@ -0,0 +1,256 @@ +FIFOSampleBuffer.lo: FIFOSampleBuffer.cpp /usr/include/stdc-predef.h \ + /usr/include/stdlib.h /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \ + /usr/include/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/include/stddef.h \ + /usr/include/bits/waitflags.h /usr/include/bits/waitstatus.h \ + /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/bits/byteswap.h /usr/include/bits/types.h \ + /usr/include/bits/typesizes.h /usr/include/bits/byteswap-16.h \ + /usr/include/xlocale.h /usr/include/sys/types.h /usr/include/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/bits/time.h \ + /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \ + /usr/include/alloca.h /usr/include/bits/stdlib-bsearch.h \ + /usr/include/bits/stdlib-float.h /usr/include/memory.h \ + /usr/include/string.h /usr/include/assert.h \ + /usr/include/c++/5.1.0/stdexcept /usr/include/c++/5.1.0/exception \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/c++config.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/os_defines.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/cpu_defines.h \ + /usr/include/c++/5.1.0/bits/atomic_lockfree_defines.h \ + /usr/include/c++/5.1.0/string /usr/include/c++/5.1.0/bits/stringfwd.h \ + /usr/include/c++/5.1.0/bits/memoryfwd.h \ + /usr/include/c++/5.1.0/bits/char_traits.h \ + /usr/include/c++/5.1.0/bits/stl_algobase.h \ + /usr/include/c++/5.1.0/bits/functexcept.h \ + /usr/include/c++/5.1.0/bits/exception_defines.h \ + /usr/include/c++/5.1.0/bits/cpp_type_traits.h \ + /usr/include/c++/5.1.0/ext/type_traits.h \ + /usr/include/c++/5.1.0/ext/numeric_traits.h \ + /usr/include/c++/5.1.0/bits/stl_pair.h \ + /usr/include/c++/5.1.0/bits/move.h \ + /usr/include/c++/5.1.0/bits/concept_check.h \ + /usr/include/c++/5.1.0/bits/stl_iterator_base_types.h \ + /usr/include/c++/5.1.0/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/5.1.0/debug/debug.h \ + /usr/include/c++/5.1.0/bits/stl_iterator.h \ + /usr/include/c++/5.1.0/bits/ptr_traits.h \ + /usr/include/c++/5.1.0/bits/predefined_ops.h \ + /usr/include/c++/5.1.0/bits/postypes.h /usr/include/c++/5.1.0/cwchar \ + /usr/include/wchar.h /usr/include/stdio.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/include/stdarg.h \ + /usr/include/bits/wchar.h /usr/include/c++/5.1.0/bits/allocator.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/c++allocator.h \ + /usr/include/c++/5.1.0/ext/new_allocator.h /usr/include/c++/5.1.0/new \ + /usr/include/c++/5.1.0/bits/localefwd.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/c++locale.h \ + /usr/include/c++/5.1.0/clocale /usr/include/locale.h \ + /usr/include/bits/locale.h /usr/include/c++/5.1.0/iosfwd \ + /usr/include/c++/5.1.0/cctype /usr/include/ctype.h \ + /usr/include/c++/5.1.0/bits/ostream_insert.h \ + /usr/include/c++/5.1.0/bits/cxxabi_forced.h \ + /usr/include/c++/5.1.0/bits/stl_function.h \ + /usr/include/c++/5.1.0/backward/binders.h \ + /usr/include/c++/5.1.0/bits/range_access.h \ + /usr/include/c++/5.1.0/bits/basic_string.h \ + /usr/include/c++/5.1.0/ext/atomicity.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/gthr.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h /usr/include/bits/sched.h \ + /usr/include/bits/timex.h /usr/include/bits/setjmp.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/atomic_word.h \ + /usr/include/c++/5.1.0/ext/alloc_traits.h \ + /usr/include/c++/5.1.0/bits/basic_string.tcc \ + ../../include/FIFOSampleBuffer.h ../../include/FIFOSamplePipe.h \ + ../../include/STTypes.h ../../include/soundtouch_config.h + +/usr/include/stdc-predef.h: + +/usr/include/stdlib.h: + +/usr/include/features.h: + +/usr/include/sys/cdefs.h: + +/usr/include/bits/wordsize.h: + +/usr/include/gnu/stubs.h: + +/usr/include/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/include/stddef.h: + +/usr/include/bits/waitflags.h: + +/usr/include/bits/waitstatus.h: + +/usr/include/endian.h: + +/usr/include/bits/endian.h: + +/usr/include/bits/byteswap.h: + +/usr/include/bits/types.h: + +/usr/include/bits/typesizes.h: + +/usr/include/bits/byteswap-16.h: + +/usr/include/xlocale.h: + +/usr/include/sys/types.h: + +/usr/include/time.h: + +/usr/include/sys/select.h: + +/usr/include/bits/select.h: + +/usr/include/bits/sigset.h: + +/usr/include/bits/time.h: + +/usr/include/sys/sysmacros.h: + +/usr/include/bits/pthreadtypes.h: + +/usr/include/alloca.h: + +/usr/include/bits/stdlib-bsearch.h: + +/usr/include/bits/stdlib-float.h: + +/usr/include/memory.h: + +/usr/include/string.h: + +/usr/include/assert.h: + +/usr/include/c++/5.1.0/stdexcept: + +/usr/include/c++/5.1.0/exception: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/c++config.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/os_defines.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/cpu_defines.h: + +/usr/include/c++/5.1.0/bits/atomic_lockfree_defines.h: + +/usr/include/c++/5.1.0/string: + +/usr/include/c++/5.1.0/bits/stringfwd.h: + +/usr/include/c++/5.1.0/bits/memoryfwd.h: + +/usr/include/c++/5.1.0/bits/char_traits.h: + +/usr/include/c++/5.1.0/bits/stl_algobase.h: + +/usr/include/c++/5.1.0/bits/functexcept.h: + +/usr/include/c++/5.1.0/bits/exception_defines.h: + +/usr/include/c++/5.1.0/bits/cpp_type_traits.h: + +/usr/include/c++/5.1.0/ext/type_traits.h: + +/usr/include/c++/5.1.0/ext/numeric_traits.h: + +/usr/include/c++/5.1.0/bits/stl_pair.h: + +/usr/include/c++/5.1.0/bits/move.h: + +/usr/include/c++/5.1.0/bits/concept_check.h: + +/usr/include/c++/5.1.0/bits/stl_iterator_base_types.h: + +/usr/include/c++/5.1.0/bits/stl_iterator_base_funcs.h: + +/usr/include/c++/5.1.0/debug/debug.h: + +/usr/include/c++/5.1.0/bits/stl_iterator.h: + +/usr/include/c++/5.1.0/bits/ptr_traits.h: + +/usr/include/c++/5.1.0/bits/predefined_ops.h: + +/usr/include/c++/5.1.0/bits/postypes.h: + +/usr/include/c++/5.1.0/cwchar: + +/usr/include/wchar.h: + +/usr/include/stdio.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/include/stdarg.h: + +/usr/include/bits/wchar.h: + +/usr/include/c++/5.1.0/bits/allocator.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/c++allocator.h: + +/usr/include/c++/5.1.0/ext/new_allocator.h: + +/usr/include/c++/5.1.0/new: + +/usr/include/c++/5.1.0/bits/localefwd.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/c++locale.h: + +/usr/include/c++/5.1.0/clocale: + +/usr/include/locale.h: + +/usr/include/bits/locale.h: + +/usr/include/c++/5.1.0/iosfwd: + +/usr/include/c++/5.1.0/cctype: + +/usr/include/ctype.h: + +/usr/include/c++/5.1.0/bits/ostream_insert.h: + +/usr/include/c++/5.1.0/bits/cxxabi_forced.h: + +/usr/include/c++/5.1.0/bits/stl_function.h: + +/usr/include/c++/5.1.0/backward/binders.h: + +/usr/include/c++/5.1.0/bits/range_access.h: + +/usr/include/c++/5.1.0/bits/basic_string.h: + +/usr/include/c++/5.1.0/ext/atomicity.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/gthr.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/gthr-default.h: + +/usr/include/pthread.h: + +/usr/include/sched.h: + +/usr/include/bits/sched.h: + +/usr/include/bits/timex.h: + +/usr/include/bits/setjmp.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/atomic_word.h: + +/usr/include/c++/5.1.0/ext/alloc_traits.h: + +/usr/include/c++/5.1.0/bits/basic_string.tcc: + +../../include/FIFOSampleBuffer.h: + +../../include/FIFOSamplePipe.h: + +../../include/STTypes.h: + +../../include/soundtouch_config.h: diff --git a/pysoundtouch/soundtouch/source/SoundTouch/.deps/FIRFilter.Plo b/pysoundtouch/soundtouch/source/SoundTouch/.deps/FIRFilter.Plo new file mode 100644 index 0000000..f12dc29 --- /dev/null +++ b/pysoundtouch/soundtouch/source/SoundTouch/.deps/FIRFilter.Plo @@ -0,0 +1,277 @@ +FIRFilter.lo: FIRFilter.cpp /usr/include/stdc-predef.h \ + /usr/include/memory.h /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \ + /usr/include/gnu/stubs-64.h /usr/include/string.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/include/stddef.h \ + /usr/include/xlocale.h /usr/include/assert.h /usr/include/math.h \ + /usr/include/bits/huge_val.h /usr/include/bits/huge_valf.h \ + /usr/include/bits/huge_vall.h /usr/include/bits/inf.h \ + /usr/include/bits/nan.h /usr/include/bits/mathdef.h \ + /usr/include/bits/mathcalls.h /usr/include/bits/mathinline.h \ + /usr/include/stdlib.h /usr/include/bits/waitflags.h \ + /usr/include/bits/waitstatus.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/bits/byteswap.h \ + /usr/include/bits/types.h /usr/include/bits/typesizes.h \ + /usr/include/bits/byteswap-16.h /usr/include/sys/types.h \ + /usr/include/time.h /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/bits/time.h \ + /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \ + /usr/include/alloca.h /usr/include/bits/stdlib-bsearch.h \ + /usr/include/bits/stdlib-float.h /usr/include/c++/5.1.0/stdexcept \ + /usr/include/c++/5.1.0/exception \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/c++config.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/os_defines.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/cpu_defines.h \ + /usr/include/c++/5.1.0/bits/atomic_lockfree_defines.h \ + /usr/include/c++/5.1.0/string /usr/include/c++/5.1.0/bits/stringfwd.h \ + /usr/include/c++/5.1.0/bits/memoryfwd.h \ + /usr/include/c++/5.1.0/bits/char_traits.h \ + /usr/include/c++/5.1.0/bits/stl_algobase.h \ + /usr/include/c++/5.1.0/bits/functexcept.h \ + /usr/include/c++/5.1.0/bits/exception_defines.h \ + /usr/include/c++/5.1.0/bits/cpp_type_traits.h \ + /usr/include/c++/5.1.0/ext/type_traits.h \ + /usr/include/c++/5.1.0/ext/numeric_traits.h \ + /usr/include/c++/5.1.0/bits/stl_pair.h \ + /usr/include/c++/5.1.0/bits/move.h \ + /usr/include/c++/5.1.0/bits/concept_check.h \ + /usr/include/c++/5.1.0/bits/stl_iterator_base_types.h \ + /usr/include/c++/5.1.0/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/5.1.0/debug/debug.h \ + /usr/include/c++/5.1.0/bits/stl_iterator.h \ + /usr/include/c++/5.1.0/bits/ptr_traits.h \ + /usr/include/c++/5.1.0/bits/predefined_ops.h \ + /usr/include/c++/5.1.0/bits/postypes.h /usr/include/c++/5.1.0/cwchar \ + /usr/include/wchar.h /usr/include/stdio.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/include/stdarg.h \ + /usr/include/bits/wchar.h /usr/include/c++/5.1.0/bits/allocator.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/c++allocator.h \ + /usr/include/c++/5.1.0/ext/new_allocator.h /usr/include/c++/5.1.0/new \ + /usr/include/c++/5.1.0/bits/localefwd.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/c++locale.h \ + /usr/include/c++/5.1.0/clocale /usr/include/locale.h \ + /usr/include/bits/locale.h /usr/include/c++/5.1.0/iosfwd \ + /usr/include/c++/5.1.0/cctype /usr/include/ctype.h \ + /usr/include/c++/5.1.0/bits/ostream_insert.h \ + /usr/include/c++/5.1.0/bits/cxxabi_forced.h \ + /usr/include/c++/5.1.0/bits/stl_function.h \ + /usr/include/c++/5.1.0/backward/binders.h \ + /usr/include/c++/5.1.0/bits/range_access.h \ + /usr/include/c++/5.1.0/bits/basic_string.h \ + /usr/include/c++/5.1.0/ext/atomicity.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/gthr.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h /usr/include/bits/sched.h \ + /usr/include/bits/timex.h /usr/include/bits/setjmp.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/atomic_word.h \ + /usr/include/c++/5.1.0/ext/alloc_traits.h \ + /usr/include/c++/5.1.0/bits/basic_string.tcc FIRFilter.h \ + ../../include/STTypes.h ../../include/soundtouch_config.h cpu_detect.h + +/usr/include/stdc-predef.h: + +/usr/include/memory.h: + +/usr/include/features.h: + +/usr/include/sys/cdefs.h: + +/usr/include/bits/wordsize.h: + +/usr/include/gnu/stubs.h: + +/usr/include/gnu/stubs-64.h: + +/usr/include/string.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/include/stddef.h: + +/usr/include/xlocale.h: + +/usr/include/assert.h: + +/usr/include/math.h: + +/usr/include/bits/huge_val.h: + +/usr/include/bits/huge_valf.h: + +/usr/include/bits/huge_vall.h: + +/usr/include/bits/inf.h: + +/usr/include/bits/nan.h: + +/usr/include/bits/mathdef.h: + +/usr/include/bits/mathcalls.h: + +/usr/include/bits/mathinline.h: + +/usr/include/stdlib.h: + +/usr/include/bits/waitflags.h: + +/usr/include/bits/waitstatus.h: + +/usr/include/endian.h: + +/usr/include/bits/endian.h: + +/usr/include/bits/byteswap.h: + +/usr/include/bits/types.h: + +/usr/include/bits/typesizes.h: + +/usr/include/bits/byteswap-16.h: + +/usr/include/sys/types.h: + +/usr/include/time.h: + +/usr/include/sys/select.h: + +/usr/include/bits/select.h: + +/usr/include/bits/sigset.h: + +/usr/include/bits/time.h: + +/usr/include/sys/sysmacros.h: + +/usr/include/bits/pthreadtypes.h: + +/usr/include/alloca.h: + +/usr/include/bits/stdlib-bsearch.h: + +/usr/include/bits/stdlib-float.h: + +/usr/include/c++/5.1.0/stdexcept: + +/usr/include/c++/5.1.0/exception: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/c++config.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/os_defines.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/cpu_defines.h: + +/usr/include/c++/5.1.0/bits/atomic_lockfree_defines.h: + +/usr/include/c++/5.1.0/string: + +/usr/include/c++/5.1.0/bits/stringfwd.h: + +/usr/include/c++/5.1.0/bits/memoryfwd.h: + +/usr/include/c++/5.1.0/bits/char_traits.h: + +/usr/include/c++/5.1.0/bits/stl_algobase.h: + +/usr/include/c++/5.1.0/bits/functexcept.h: + +/usr/include/c++/5.1.0/bits/exception_defines.h: + +/usr/include/c++/5.1.0/bits/cpp_type_traits.h: + +/usr/include/c++/5.1.0/ext/type_traits.h: + +/usr/include/c++/5.1.0/ext/numeric_traits.h: + +/usr/include/c++/5.1.0/bits/stl_pair.h: + +/usr/include/c++/5.1.0/bits/move.h: + +/usr/include/c++/5.1.0/bits/concept_check.h: + +/usr/include/c++/5.1.0/bits/stl_iterator_base_types.h: + +/usr/include/c++/5.1.0/bits/stl_iterator_base_funcs.h: + +/usr/include/c++/5.1.0/debug/debug.h: + +/usr/include/c++/5.1.0/bits/stl_iterator.h: + +/usr/include/c++/5.1.0/bits/ptr_traits.h: + +/usr/include/c++/5.1.0/bits/predefined_ops.h: + +/usr/include/c++/5.1.0/bits/postypes.h: + +/usr/include/c++/5.1.0/cwchar: + +/usr/include/wchar.h: + +/usr/include/stdio.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/include/stdarg.h: + +/usr/include/bits/wchar.h: + +/usr/include/c++/5.1.0/bits/allocator.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/c++allocator.h: + +/usr/include/c++/5.1.0/ext/new_allocator.h: + +/usr/include/c++/5.1.0/new: + +/usr/include/c++/5.1.0/bits/localefwd.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/c++locale.h: + +/usr/include/c++/5.1.0/clocale: + +/usr/include/locale.h: + +/usr/include/bits/locale.h: + +/usr/include/c++/5.1.0/iosfwd: + +/usr/include/c++/5.1.0/cctype: + +/usr/include/ctype.h: + +/usr/include/c++/5.1.0/bits/ostream_insert.h: + +/usr/include/c++/5.1.0/bits/cxxabi_forced.h: + +/usr/include/c++/5.1.0/bits/stl_function.h: + +/usr/include/c++/5.1.0/backward/binders.h: + +/usr/include/c++/5.1.0/bits/range_access.h: + +/usr/include/c++/5.1.0/bits/basic_string.h: + +/usr/include/c++/5.1.0/ext/atomicity.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/gthr.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/gthr-default.h: + +/usr/include/pthread.h: + +/usr/include/sched.h: + +/usr/include/bits/sched.h: + +/usr/include/bits/timex.h: + +/usr/include/bits/setjmp.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/atomic_word.h: + +/usr/include/c++/5.1.0/ext/alloc_traits.h: + +/usr/include/c++/5.1.0/bits/basic_string.tcc: + +FIRFilter.h: + +../../include/STTypes.h: + +../../include/soundtouch_config.h: + +cpu_detect.h: diff --git a/pysoundtouch/soundtouch/source/SoundTouch/.deps/PeakFinder.Plo b/pysoundtouch/soundtouch/source/SoundTouch/.deps/PeakFinder.Plo new file mode 100644 index 0000000..dee643c --- /dev/null +++ b/pysoundtouch/soundtouch/source/SoundTouch/.deps/PeakFinder.Plo @@ -0,0 +1,71 @@ +PeakFinder.lo: PeakFinder.cpp /usr/include/stdc-predef.h \ + /usr/include/math.h /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \ + /usr/include/gnu/stubs-64.h /usr/include/bits/huge_val.h \ + /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \ + /usr/include/bits/inf.h /usr/include/bits/nan.h \ + /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \ + /usr/include/bits/mathinline.h /usr/include/assert.h \ + /usr/include/stdio.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/typesizes.h \ + /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/bits/stdio.h PeakFinder.h + +/usr/include/stdc-predef.h: + +/usr/include/math.h: + +/usr/include/features.h: + +/usr/include/sys/cdefs.h: + +/usr/include/bits/wordsize.h: + +/usr/include/gnu/stubs.h: + +/usr/include/gnu/stubs-64.h: + +/usr/include/bits/huge_val.h: + +/usr/include/bits/huge_valf.h: + +/usr/include/bits/huge_vall.h: + +/usr/include/bits/inf.h: + +/usr/include/bits/nan.h: + +/usr/include/bits/mathdef.h: + +/usr/include/bits/mathcalls.h: + +/usr/include/bits/mathinline.h: + +/usr/include/assert.h: + +/usr/include/stdio.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/include/stddef.h: + +/usr/include/bits/types.h: + +/usr/include/bits/typesizes.h: + +/usr/include/libio.h: + +/usr/include/_G_config.h: + +/usr/include/wchar.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/include/stdarg.h: + +/usr/include/bits/stdio_lim.h: + +/usr/include/bits/sys_errlist.h: + +/usr/include/bits/stdio.h: + +PeakFinder.h: diff --git a/pysoundtouch/soundtouch/source/SoundTouch/.deps/RateTransposer.Plo b/pysoundtouch/soundtouch/source/SoundTouch/.deps/RateTransposer.Plo new file mode 100644 index 0000000..f347c92 --- /dev/null +++ b/pysoundtouch/soundtouch/source/SoundTouch/.deps/RateTransposer.Plo @@ -0,0 +1,277 @@ +RateTransposer.lo: RateTransposer.cpp /usr/include/stdc-predef.h \ + /usr/include/memory.h /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \ + /usr/include/gnu/stubs-64.h /usr/include/string.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/include/stddef.h \ + /usr/include/xlocale.h /usr/include/assert.h /usr/include/stdlib.h \ + /usr/include/bits/waitflags.h /usr/include/bits/waitstatus.h \ + /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/bits/byteswap.h /usr/include/bits/types.h \ + /usr/include/bits/typesizes.h /usr/include/bits/byteswap-16.h \ + /usr/include/sys/types.h /usr/include/time.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/bits/time.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/alloca.h \ + /usr/include/bits/stdlib-bsearch.h /usr/include/bits/stdlib-float.h \ + /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \ + /usr/include/wchar.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/bits/stdio.h /usr/include/c++/5.1.0/stdexcept \ + /usr/include/c++/5.1.0/exception \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/c++config.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/os_defines.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/cpu_defines.h \ + /usr/include/c++/5.1.0/bits/atomic_lockfree_defines.h \ + /usr/include/c++/5.1.0/string /usr/include/c++/5.1.0/bits/stringfwd.h \ + /usr/include/c++/5.1.0/bits/memoryfwd.h \ + /usr/include/c++/5.1.0/bits/char_traits.h \ + /usr/include/c++/5.1.0/bits/stl_algobase.h \ + /usr/include/c++/5.1.0/bits/functexcept.h \ + /usr/include/c++/5.1.0/bits/exception_defines.h \ + /usr/include/c++/5.1.0/bits/cpp_type_traits.h \ + /usr/include/c++/5.1.0/ext/type_traits.h \ + /usr/include/c++/5.1.0/ext/numeric_traits.h \ + /usr/include/c++/5.1.0/bits/stl_pair.h \ + /usr/include/c++/5.1.0/bits/move.h \ + /usr/include/c++/5.1.0/bits/concept_check.h \ + /usr/include/c++/5.1.0/bits/stl_iterator_base_types.h \ + /usr/include/c++/5.1.0/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/5.1.0/debug/debug.h \ + /usr/include/c++/5.1.0/bits/stl_iterator.h \ + /usr/include/c++/5.1.0/bits/ptr_traits.h \ + /usr/include/c++/5.1.0/bits/predefined_ops.h \ + /usr/include/c++/5.1.0/bits/postypes.h /usr/include/c++/5.1.0/cwchar \ + /usr/include/bits/wchar.h /usr/include/c++/5.1.0/bits/allocator.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/c++allocator.h \ + /usr/include/c++/5.1.0/ext/new_allocator.h /usr/include/c++/5.1.0/new \ + /usr/include/c++/5.1.0/bits/localefwd.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/c++locale.h \ + /usr/include/c++/5.1.0/clocale /usr/include/locale.h \ + /usr/include/bits/locale.h /usr/include/c++/5.1.0/iosfwd \ + /usr/include/c++/5.1.0/cctype /usr/include/ctype.h \ + /usr/include/c++/5.1.0/bits/ostream_insert.h \ + /usr/include/c++/5.1.0/bits/cxxabi_forced.h \ + /usr/include/c++/5.1.0/bits/stl_function.h \ + /usr/include/c++/5.1.0/backward/binders.h \ + /usr/include/c++/5.1.0/bits/range_access.h \ + /usr/include/c++/5.1.0/bits/basic_string.h \ + /usr/include/c++/5.1.0/ext/atomicity.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/gthr.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h /usr/include/bits/sched.h \ + /usr/include/bits/timex.h /usr/include/bits/setjmp.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/atomic_word.h \ + /usr/include/c++/5.1.0/ext/alloc_traits.h \ + /usr/include/c++/5.1.0/bits/basic_string.tcc RateTransposer.h AAFilter.h \ + ../../include/STTypes.h ../../include/soundtouch_config.h \ + ../../include/FIFOSamplePipe.h ../../include/STTypes.h \ + ../../include/FIFOSampleBuffer.h ../../include/FIFOSamplePipe.h + +/usr/include/stdc-predef.h: + +/usr/include/memory.h: + +/usr/include/features.h: + +/usr/include/sys/cdefs.h: + +/usr/include/bits/wordsize.h: + +/usr/include/gnu/stubs.h: + +/usr/include/gnu/stubs-64.h: + +/usr/include/string.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/include/stddef.h: + +/usr/include/xlocale.h: + +/usr/include/assert.h: + +/usr/include/stdlib.h: + +/usr/include/bits/waitflags.h: + +/usr/include/bits/waitstatus.h: + +/usr/include/endian.h: + +/usr/include/bits/endian.h: + +/usr/include/bits/byteswap.h: + +/usr/include/bits/types.h: + +/usr/include/bits/typesizes.h: + +/usr/include/bits/byteswap-16.h: + +/usr/include/sys/types.h: + +/usr/include/time.h: + +/usr/include/sys/select.h: + +/usr/include/bits/select.h: + +/usr/include/bits/sigset.h: + +/usr/include/bits/time.h: + +/usr/include/sys/sysmacros.h: + +/usr/include/bits/pthreadtypes.h: + +/usr/include/alloca.h: + +/usr/include/bits/stdlib-bsearch.h: + +/usr/include/bits/stdlib-float.h: + +/usr/include/stdio.h: + +/usr/include/libio.h: + +/usr/include/_G_config.h: + +/usr/include/wchar.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/include/stdarg.h: + +/usr/include/bits/stdio_lim.h: + +/usr/include/bits/sys_errlist.h: + +/usr/include/bits/stdio.h: + +/usr/include/c++/5.1.0/stdexcept: + +/usr/include/c++/5.1.0/exception: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/c++config.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/os_defines.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/cpu_defines.h: + +/usr/include/c++/5.1.0/bits/atomic_lockfree_defines.h: + +/usr/include/c++/5.1.0/string: + +/usr/include/c++/5.1.0/bits/stringfwd.h: + +/usr/include/c++/5.1.0/bits/memoryfwd.h: + +/usr/include/c++/5.1.0/bits/char_traits.h: + +/usr/include/c++/5.1.0/bits/stl_algobase.h: + +/usr/include/c++/5.1.0/bits/functexcept.h: + +/usr/include/c++/5.1.0/bits/exception_defines.h: + +/usr/include/c++/5.1.0/bits/cpp_type_traits.h: + +/usr/include/c++/5.1.0/ext/type_traits.h: + +/usr/include/c++/5.1.0/ext/numeric_traits.h: + +/usr/include/c++/5.1.0/bits/stl_pair.h: + +/usr/include/c++/5.1.0/bits/move.h: + +/usr/include/c++/5.1.0/bits/concept_check.h: + +/usr/include/c++/5.1.0/bits/stl_iterator_base_types.h: + +/usr/include/c++/5.1.0/bits/stl_iterator_base_funcs.h: + +/usr/include/c++/5.1.0/debug/debug.h: + +/usr/include/c++/5.1.0/bits/stl_iterator.h: + +/usr/include/c++/5.1.0/bits/ptr_traits.h: + +/usr/include/c++/5.1.0/bits/predefined_ops.h: + +/usr/include/c++/5.1.0/bits/postypes.h: + +/usr/include/c++/5.1.0/cwchar: + +/usr/include/bits/wchar.h: + +/usr/include/c++/5.1.0/bits/allocator.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/c++allocator.h: + +/usr/include/c++/5.1.0/ext/new_allocator.h: + +/usr/include/c++/5.1.0/new: + +/usr/include/c++/5.1.0/bits/localefwd.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/c++locale.h: + +/usr/include/c++/5.1.0/clocale: + +/usr/include/locale.h: + +/usr/include/bits/locale.h: + +/usr/include/c++/5.1.0/iosfwd: + +/usr/include/c++/5.1.0/cctype: + +/usr/include/ctype.h: + +/usr/include/c++/5.1.0/bits/ostream_insert.h: + +/usr/include/c++/5.1.0/bits/cxxabi_forced.h: + +/usr/include/c++/5.1.0/bits/stl_function.h: + +/usr/include/c++/5.1.0/backward/binders.h: + +/usr/include/c++/5.1.0/bits/range_access.h: + +/usr/include/c++/5.1.0/bits/basic_string.h: + +/usr/include/c++/5.1.0/ext/atomicity.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/gthr.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/gthr-default.h: + +/usr/include/pthread.h: + +/usr/include/sched.h: + +/usr/include/bits/sched.h: + +/usr/include/bits/timex.h: + +/usr/include/bits/setjmp.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/atomic_word.h: + +/usr/include/c++/5.1.0/ext/alloc_traits.h: + +/usr/include/c++/5.1.0/bits/basic_string.tcc: + +RateTransposer.h: + +AAFilter.h: + +../../include/STTypes.h: + +../../include/soundtouch_config.h: + +../../include/FIFOSamplePipe.h: + +../../include/STTypes.h: + +../../include/FIFOSampleBuffer.h: + +../../include/FIFOSamplePipe.h: diff --git a/pysoundtouch/soundtouch/source/SoundTouch/.deps/SoundTouch.Plo b/pysoundtouch/soundtouch/source/SoundTouch/.deps/SoundTouch.Plo new file mode 100644 index 0000000..fff25fc --- /dev/null +++ b/pysoundtouch/soundtouch/source/SoundTouch/.deps/SoundTouch.Plo @@ -0,0 +1,307 @@ +SoundTouch.lo: SoundTouch.cpp /usr/include/stdc-predef.h \ + /usr/include/assert.h /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \ + /usr/include/gnu/stubs-64.h /usr/include/stdlib.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/include/stddef.h \ + /usr/include/bits/waitflags.h /usr/include/bits/waitstatus.h \ + /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/bits/byteswap.h /usr/include/bits/types.h \ + /usr/include/bits/typesizes.h /usr/include/bits/byteswap-16.h \ + /usr/include/xlocale.h /usr/include/sys/types.h /usr/include/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/bits/time.h \ + /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \ + /usr/include/alloca.h /usr/include/bits/stdlib-bsearch.h \ + /usr/include/bits/stdlib-float.h /usr/include/memory.h \ + /usr/include/string.h /usr/include/math.h /usr/include/bits/huge_val.h \ + /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \ + /usr/include/bits/inf.h /usr/include/bits/nan.h \ + /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \ + /usr/include/bits/mathinline.h /usr/include/c++/5.1.0/stdexcept \ + /usr/include/c++/5.1.0/exception \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/c++config.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/os_defines.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/cpu_defines.h \ + /usr/include/c++/5.1.0/bits/atomic_lockfree_defines.h \ + /usr/include/c++/5.1.0/string /usr/include/c++/5.1.0/bits/stringfwd.h \ + /usr/include/c++/5.1.0/bits/memoryfwd.h \ + /usr/include/c++/5.1.0/bits/char_traits.h \ + /usr/include/c++/5.1.0/bits/stl_algobase.h \ + /usr/include/c++/5.1.0/bits/functexcept.h \ + /usr/include/c++/5.1.0/bits/exception_defines.h \ + /usr/include/c++/5.1.0/bits/cpp_type_traits.h \ + /usr/include/c++/5.1.0/ext/type_traits.h \ + /usr/include/c++/5.1.0/ext/numeric_traits.h \ + /usr/include/c++/5.1.0/bits/stl_pair.h \ + /usr/include/c++/5.1.0/bits/move.h \ + /usr/include/c++/5.1.0/bits/concept_check.h \ + /usr/include/c++/5.1.0/bits/stl_iterator_base_types.h \ + /usr/include/c++/5.1.0/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/5.1.0/debug/debug.h \ + /usr/include/c++/5.1.0/bits/stl_iterator.h \ + /usr/include/c++/5.1.0/bits/ptr_traits.h \ + /usr/include/c++/5.1.0/bits/predefined_ops.h \ + /usr/include/c++/5.1.0/bits/postypes.h /usr/include/c++/5.1.0/cwchar \ + /usr/include/wchar.h /usr/include/stdio.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/include/stdarg.h \ + /usr/include/bits/wchar.h /usr/include/c++/5.1.0/bits/allocator.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/c++allocator.h \ + /usr/include/c++/5.1.0/ext/new_allocator.h /usr/include/c++/5.1.0/new \ + /usr/include/c++/5.1.0/bits/localefwd.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/c++locale.h \ + /usr/include/c++/5.1.0/clocale /usr/include/locale.h \ + /usr/include/bits/locale.h /usr/include/c++/5.1.0/iosfwd \ + /usr/include/c++/5.1.0/cctype /usr/include/ctype.h \ + /usr/include/c++/5.1.0/bits/ostream_insert.h \ + /usr/include/c++/5.1.0/bits/cxxabi_forced.h \ + /usr/include/c++/5.1.0/bits/stl_function.h \ + /usr/include/c++/5.1.0/backward/binders.h \ + /usr/include/c++/5.1.0/bits/range_access.h \ + /usr/include/c++/5.1.0/bits/basic_string.h \ + /usr/include/c++/5.1.0/ext/atomicity.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/gthr.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h /usr/include/bits/sched.h \ + /usr/include/bits/timex.h /usr/include/bits/setjmp.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/atomic_word.h \ + /usr/include/c++/5.1.0/ext/alloc_traits.h \ + /usr/include/c++/5.1.0/bits/basic_string.tcc /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/bits/stdio_lim.h \ + /usr/include/bits/sys_errlist.h /usr/include/bits/stdio.h \ + ../../include/SoundTouch.h ../../include/FIFOSamplePipe.h \ + ../../include/STTypes.h ../../include/soundtouch_config.h TDStretch.h \ + ../../include/STTypes.h RateTransposer.h AAFilter.h \ + ../../include/FIFOSamplePipe.h ../../include/FIFOSampleBuffer.h \ + cpu_detect.h + +/usr/include/stdc-predef.h: + +/usr/include/assert.h: + +/usr/include/features.h: + +/usr/include/sys/cdefs.h: + +/usr/include/bits/wordsize.h: + +/usr/include/gnu/stubs.h: + +/usr/include/gnu/stubs-64.h: + +/usr/include/stdlib.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/include/stddef.h: + +/usr/include/bits/waitflags.h: + +/usr/include/bits/waitstatus.h: + +/usr/include/endian.h: + +/usr/include/bits/endian.h: + +/usr/include/bits/byteswap.h: + +/usr/include/bits/types.h: + +/usr/include/bits/typesizes.h: + +/usr/include/bits/byteswap-16.h: + +/usr/include/xlocale.h: + +/usr/include/sys/types.h: + +/usr/include/time.h: + +/usr/include/sys/select.h: + +/usr/include/bits/select.h: + +/usr/include/bits/sigset.h: + +/usr/include/bits/time.h: + +/usr/include/sys/sysmacros.h: + +/usr/include/bits/pthreadtypes.h: + +/usr/include/alloca.h: + +/usr/include/bits/stdlib-bsearch.h: + +/usr/include/bits/stdlib-float.h: + +/usr/include/memory.h: + +/usr/include/string.h: + +/usr/include/math.h: + +/usr/include/bits/huge_val.h: + +/usr/include/bits/huge_valf.h: + +/usr/include/bits/huge_vall.h: + +/usr/include/bits/inf.h: + +/usr/include/bits/nan.h: + +/usr/include/bits/mathdef.h: + +/usr/include/bits/mathcalls.h: + +/usr/include/bits/mathinline.h: + +/usr/include/c++/5.1.0/stdexcept: + +/usr/include/c++/5.1.0/exception: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/c++config.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/os_defines.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/cpu_defines.h: + +/usr/include/c++/5.1.0/bits/atomic_lockfree_defines.h: + +/usr/include/c++/5.1.0/string: + +/usr/include/c++/5.1.0/bits/stringfwd.h: + +/usr/include/c++/5.1.0/bits/memoryfwd.h: + +/usr/include/c++/5.1.0/bits/char_traits.h: + +/usr/include/c++/5.1.0/bits/stl_algobase.h: + +/usr/include/c++/5.1.0/bits/functexcept.h: + +/usr/include/c++/5.1.0/bits/exception_defines.h: + +/usr/include/c++/5.1.0/bits/cpp_type_traits.h: + +/usr/include/c++/5.1.0/ext/type_traits.h: + +/usr/include/c++/5.1.0/ext/numeric_traits.h: + +/usr/include/c++/5.1.0/bits/stl_pair.h: + +/usr/include/c++/5.1.0/bits/move.h: + +/usr/include/c++/5.1.0/bits/concept_check.h: + +/usr/include/c++/5.1.0/bits/stl_iterator_base_types.h: + +/usr/include/c++/5.1.0/bits/stl_iterator_base_funcs.h: + +/usr/include/c++/5.1.0/debug/debug.h: + +/usr/include/c++/5.1.0/bits/stl_iterator.h: + +/usr/include/c++/5.1.0/bits/ptr_traits.h: + +/usr/include/c++/5.1.0/bits/predefined_ops.h: + +/usr/include/c++/5.1.0/bits/postypes.h: + +/usr/include/c++/5.1.0/cwchar: + +/usr/include/wchar.h: + +/usr/include/stdio.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/include/stdarg.h: + +/usr/include/bits/wchar.h: + +/usr/include/c++/5.1.0/bits/allocator.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/c++allocator.h: + +/usr/include/c++/5.1.0/ext/new_allocator.h: + +/usr/include/c++/5.1.0/new: + +/usr/include/c++/5.1.0/bits/localefwd.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/c++locale.h: + +/usr/include/c++/5.1.0/clocale: + +/usr/include/locale.h: + +/usr/include/bits/locale.h: + +/usr/include/c++/5.1.0/iosfwd: + +/usr/include/c++/5.1.0/cctype: + +/usr/include/ctype.h: + +/usr/include/c++/5.1.0/bits/ostream_insert.h: + +/usr/include/c++/5.1.0/bits/cxxabi_forced.h: + +/usr/include/c++/5.1.0/bits/stl_function.h: + +/usr/include/c++/5.1.0/backward/binders.h: + +/usr/include/c++/5.1.0/bits/range_access.h: + +/usr/include/c++/5.1.0/bits/basic_string.h: + +/usr/include/c++/5.1.0/ext/atomicity.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/gthr.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/gthr-default.h: + +/usr/include/pthread.h: + +/usr/include/sched.h: + +/usr/include/bits/sched.h: + +/usr/include/bits/timex.h: + +/usr/include/bits/setjmp.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/atomic_word.h: + +/usr/include/c++/5.1.0/ext/alloc_traits.h: + +/usr/include/c++/5.1.0/bits/basic_string.tcc: + +/usr/include/libio.h: + +/usr/include/_G_config.h: + +/usr/include/bits/stdio_lim.h: + +/usr/include/bits/sys_errlist.h: + +/usr/include/bits/stdio.h: + +../../include/SoundTouch.h: + +../../include/FIFOSamplePipe.h: + +../../include/STTypes.h: + +../../include/soundtouch_config.h: + +TDStretch.h: + +../../include/STTypes.h: + +RateTransposer.h: + +AAFilter.h: + +../../include/FIFOSamplePipe.h: + +../../include/FIFOSampleBuffer.h: + +cpu_detect.h: diff --git a/pysoundtouch/soundtouch/source/SoundTouch/.deps/TDStretch.Plo b/pysoundtouch/soundtouch/source/SoundTouch/.deps/TDStretch.Plo new file mode 100644 index 0000000..5fc1b67 --- /dev/null +++ b/pysoundtouch/soundtouch/source/SoundTouch/.deps/TDStretch.Plo @@ -0,0 +1,327 @@ +TDStretch.lo: TDStretch.cpp /usr/include/stdc-predef.h \ + /usr/include/string.h /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \ + /usr/include/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/include/stddef.h \ + /usr/include/xlocale.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/include-fixed/limits.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/include-fixed/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/xopen_lim.h \ + /usr/include/bits/stdio_lim.h /usr/include/assert.h /usr/include/math.h \ + /usr/include/bits/huge_val.h /usr/include/bits/huge_valf.h \ + /usr/include/bits/huge_vall.h /usr/include/bits/inf.h \ + /usr/include/bits/nan.h /usr/include/bits/mathdef.h \ + /usr/include/bits/mathcalls.h /usr/include/bits/mathinline.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/include/float.h \ + /usr/include/c++/5.1.0/stdexcept /usr/include/c++/5.1.0/exception \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/c++config.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/os_defines.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/cpu_defines.h \ + /usr/include/c++/5.1.0/bits/atomic_lockfree_defines.h \ + /usr/include/c++/5.1.0/string /usr/include/c++/5.1.0/bits/stringfwd.h \ + /usr/include/c++/5.1.0/bits/memoryfwd.h \ + /usr/include/c++/5.1.0/bits/char_traits.h \ + /usr/include/c++/5.1.0/bits/stl_algobase.h \ + /usr/include/c++/5.1.0/bits/functexcept.h \ + /usr/include/c++/5.1.0/bits/exception_defines.h \ + /usr/include/c++/5.1.0/bits/cpp_type_traits.h \ + /usr/include/c++/5.1.0/ext/type_traits.h \ + /usr/include/c++/5.1.0/ext/numeric_traits.h \ + /usr/include/c++/5.1.0/bits/stl_pair.h \ + /usr/include/c++/5.1.0/bits/move.h \ + /usr/include/c++/5.1.0/bits/concept_check.h \ + /usr/include/c++/5.1.0/bits/stl_iterator_base_types.h \ + /usr/include/c++/5.1.0/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/5.1.0/debug/debug.h \ + /usr/include/c++/5.1.0/bits/stl_iterator.h \ + /usr/include/c++/5.1.0/bits/ptr_traits.h \ + /usr/include/c++/5.1.0/bits/predefined_ops.h \ + /usr/include/c++/5.1.0/bits/postypes.h /usr/include/c++/5.1.0/cwchar \ + /usr/include/wchar.h /usr/include/stdio.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/include/stdarg.h \ + /usr/include/bits/wchar.h /usr/include/c++/5.1.0/bits/allocator.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/c++allocator.h \ + /usr/include/c++/5.1.0/ext/new_allocator.h /usr/include/c++/5.1.0/new \ + /usr/include/c++/5.1.0/bits/localefwd.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/c++locale.h \ + /usr/include/c++/5.1.0/clocale /usr/include/locale.h \ + /usr/include/bits/locale.h /usr/include/c++/5.1.0/iosfwd \ + /usr/include/c++/5.1.0/cctype /usr/include/ctype.h \ + /usr/include/bits/types.h /usr/include/bits/typesizes.h \ + /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/bits/byteswap.h /usr/include/bits/byteswap-16.h \ + /usr/include/c++/5.1.0/bits/ostream_insert.h \ + /usr/include/c++/5.1.0/bits/cxxabi_forced.h \ + /usr/include/c++/5.1.0/bits/stl_function.h \ + /usr/include/c++/5.1.0/backward/binders.h \ + /usr/include/c++/5.1.0/bits/range_access.h \ + /usr/include/c++/5.1.0/bits/basic_string.h \ + /usr/include/c++/5.1.0/ext/atomicity.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/gthr.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h /usr/include/time.h \ + /usr/include/bits/sched.h /usr/include/bits/time.h \ + /usr/include/bits/timex.h /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/setjmp.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/atomic_word.h \ + /usr/include/c++/5.1.0/ext/alloc_traits.h \ + /usr/include/c++/5.1.0/bits/basic_string.tcc ../../include/STTypes.h \ + ../../include/soundtouch_config.h cpu_detect.h TDStretch.h \ + RateTransposer.h AAFilter.h ../../include/FIFOSamplePipe.h \ + /usr/include/stdlib.h /usr/include/bits/waitflags.h \ + /usr/include/bits/waitstatus.h /usr/include/sys/types.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/sys/sysmacros.h \ + /usr/include/alloca.h /usr/include/bits/stdlib-bsearch.h \ + /usr/include/bits/stdlib-float.h ../../include/STTypes.h \ + ../../include/FIFOSampleBuffer.h ../../include/FIFOSamplePipe.h \ + /usr/include/libio.h /usr/include/_G_config.h \ + /usr/include/bits/sys_errlist.h /usr/include/bits/stdio.h + +/usr/include/stdc-predef.h: + +/usr/include/string.h: + +/usr/include/features.h: + +/usr/include/sys/cdefs.h: + +/usr/include/bits/wordsize.h: + +/usr/include/gnu/stubs.h: + +/usr/include/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/include/stddef.h: + +/usr/include/xlocale.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/include-fixed/limits.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/include-fixed/syslimits.h: + +/usr/include/limits.h: + +/usr/include/bits/posix1_lim.h: + +/usr/include/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/bits/posix2_lim.h: + +/usr/include/bits/xopen_lim.h: + +/usr/include/bits/stdio_lim.h: + +/usr/include/assert.h: + +/usr/include/math.h: + +/usr/include/bits/huge_val.h: + +/usr/include/bits/huge_valf.h: + +/usr/include/bits/huge_vall.h: + +/usr/include/bits/inf.h: + +/usr/include/bits/nan.h: + +/usr/include/bits/mathdef.h: + +/usr/include/bits/mathcalls.h: + +/usr/include/bits/mathinline.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/include/float.h: + +/usr/include/c++/5.1.0/stdexcept: + +/usr/include/c++/5.1.0/exception: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/c++config.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/os_defines.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/cpu_defines.h: + +/usr/include/c++/5.1.0/bits/atomic_lockfree_defines.h: + +/usr/include/c++/5.1.0/string: + +/usr/include/c++/5.1.0/bits/stringfwd.h: + +/usr/include/c++/5.1.0/bits/memoryfwd.h: + +/usr/include/c++/5.1.0/bits/char_traits.h: + +/usr/include/c++/5.1.0/bits/stl_algobase.h: + +/usr/include/c++/5.1.0/bits/functexcept.h: + +/usr/include/c++/5.1.0/bits/exception_defines.h: + +/usr/include/c++/5.1.0/bits/cpp_type_traits.h: + +/usr/include/c++/5.1.0/ext/type_traits.h: + +/usr/include/c++/5.1.0/ext/numeric_traits.h: + +/usr/include/c++/5.1.0/bits/stl_pair.h: + +/usr/include/c++/5.1.0/bits/move.h: + +/usr/include/c++/5.1.0/bits/concept_check.h: + +/usr/include/c++/5.1.0/bits/stl_iterator_base_types.h: + +/usr/include/c++/5.1.0/bits/stl_iterator_base_funcs.h: + +/usr/include/c++/5.1.0/debug/debug.h: + +/usr/include/c++/5.1.0/bits/stl_iterator.h: + +/usr/include/c++/5.1.0/bits/ptr_traits.h: + +/usr/include/c++/5.1.0/bits/predefined_ops.h: + +/usr/include/c++/5.1.0/bits/postypes.h: + +/usr/include/c++/5.1.0/cwchar: + +/usr/include/wchar.h: + +/usr/include/stdio.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/include/stdarg.h: + +/usr/include/bits/wchar.h: + +/usr/include/c++/5.1.0/bits/allocator.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/c++allocator.h: + +/usr/include/c++/5.1.0/ext/new_allocator.h: + +/usr/include/c++/5.1.0/new: + +/usr/include/c++/5.1.0/bits/localefwd.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/c++locale.h: + +/usr/include/c++/5.1.0/clocale: + +/usr/include/locale.h: + +/usr/include/bits/locale.h: + +/usr/include/c++/5.1.0/iosfwd: + +/usr/include/c++/5.1.0/cctype: + +/usr/include/ctype.h: + +/usr/include/bits/types.h: + +/usr/include/bits/typesizes.h: + +/usr/include/endian.h: + +/usr/include/bits/endian.h: + +/usr/include/bits/byteswap.h: + +/usr/include/bits/byteswap-16.h: + +/usr/include/c++/5.1.0/bits/ostream_insert.h: + +/usr/include/c++/5.1.0/bits/cxxabi_forced.h: + +/usr/include/c++/5.1.0/bits/stl_function.h: + +/usr/include/c++/5.1.0/backward/binders.h: + +/usr/include/c++/5.1.0/bits/range_access.h: + +/usr/include/c++/5.1.0/bits/basic_string.h: + +/usr/include/c++/5.1.0/ext/atomicity.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/gthr.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/gthr-default.h: + +/usr/include/pthread.h: + +/usr/include/sched.h: + +/usr/include/time.h: + +/usr/include/bits/sched.h: + +/usr/include/bits/time.h: + +/usr/include/bits/timex.h: + +/usr/include/bits/pthreadtypes.h: + +/usr/include/bits/setjmp.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/atomic_word.h: + +/usr/include/c++/5.1.0/ext/alloc_traits.h: + +/usr/include/c++/5.1.0/bits/basic_string.tcc: + +../../include/STTypes.h: + +../../include/soundtouch_config.h: + +cpu_detect.h: + +TDStretch.h: + +RateTransposer.h: + +AAFilter.h: + +../../include/FIFOSamplePipe.h: + +/usr/include/stdlib.h: + +/usr/include/bits/waitflags.h: + +/usr/include/bits/waitstatus.h: + +/usr/include/sys/types.h: + +/usr/include/sys/select.h: + +/usr/include/bits/select.h: + +/usr/include/bits/sigset.h: + +/usr/include/sys/sysmacros.h: + +/usr/include/alloca.h: + +/usr/include/bits/stdlib-bsearch.h: + +/usr/include/bits/stdlib-float.h: + +../../include/STTypes.h: + +../../include/FIFOSampleBuffer.h: + +../../include/FIFOSamplePipe.h: + +/usr/include/libio.h: + +/usr/include/_G_config.h: + +/usr/include/bits/sys_errlist.h: + +/usr/include/bits/stdio.h: diff --git a/pysoundtouch/soundtouch/source/SoundTouch/.deps/cpu_detect_x86_gcc.Plo b/pysoundtouch/soundtouch/source/SoundTouch/.deps/cpu_detect_x86_gcc.Plo new file mode 100644 index 0000000..23301d5 --- /dev/null +++ b/pysoundtouch/soundtouch/source/SoundTouch/.deps/cpu_detect_x86_gcc.Plo @@ -0,0 +1,233 @@ +cpu_detect_x86_gcc.lo: cpu_detect_x86_gcc.cpp /usr/include/stdc-predef.h \ + /usr/include/c++/5.1.0/stdexcept /usr/include/c++/5.1.0/exception \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/c++config.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/os_defines.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \ + /usr/include/gnu/stubs-64.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/cpu_defines.h \ + /usr/include/c++/5.1.0/bits/atomic_lockfree_defines.h \ + /usr/include/c++/5.1.0/string /usr/include/c++/5.1.0/bits/stringfwd.h \ + /usr/include/c++/5.1.0/bits/memoryfwd.h \ + /usr/include/c++/5.1.0/bits/char_traits.h \ + /usr/include/c++/5.1.0/bits/stl_algobase.h \ + /usr/include/c++/5.1.0/bits/functexcept.h \ + /usr/include/c++/5.1.0/bits/exception_defines.h \ + /usr/include/c++/5.1.0/bits/cpp_type_traits.h \ + /usr/include/c++/5.1.0/ext/type_traits.h \ + /usr/include/c++/5.1.0/ext/numeric_traits.h \ + /usr/include/c++/5.1.0/bits/stl_pair.h \ + /usr/include/c++/5.1.0/bits/move.h \ + /usr/include/c++/5.1.0/bits/concept_check.h \ + /usr/include/c++/5.1.0/bits/stl_iterator_base_types.h \ + /usr/include/c++/5.1.0/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/5.1.0/debug/debug.h \ + /usr/include/c++/5.1.0/bits/stl_iterator.h \ + /usr/include/c++/5.1.0/bits/ptr_traits.h \ + /usr/include/c++/5.1.0/bits/predefined_ops.h \ + /usr/include/c++/5.1.0/bits/postypes.h /usr/include/c++/5.1.0/cwchar \ + /usr/include/wchar.h /usr/include/stdio.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/include/stdarg.h \ + /usr/include/bits/wchar.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/include/stddef.h \ + /usr/include/xlocale.h /usr/include/c++/5.1.0/bits/allocator.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/c++allocator.h \ + /usr/include/c++/5.1.0/ext/new_allocator.h /usr/include/c++/5.1.0/new \ + /usr/include/c++/5.1.0/bits/localefwd.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/c++locale.h \ + /usr/include/c++/5.1.0/clocale /usr/include/locale.h \ + /usr/include/bits/locale.h /usr/include/c++/5.1.0/iosfwd \ + /usr/include/c++/5.1.0/cctype /usr/include/ctype.h \ + /usr/include/bits/types.h /usr/include/bits/typesizes.h \ + /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/bits/byteswap.h /usr/include/bits/byteswap-16.h \ + /usr/include/c++/5.1.0/bits/ostream_insert.h \ + /usr/include/c++/5.1.0/bits/cxxabi_forced.h \ + /usr/include/c++/5.1.0/bits/stl_function.h \ + /usr/include/c++/5.1.0/backward/binders.h \ + /usr/include/c++/5.1.0/bits/range_access.h \ + /usr/include/c++/5.1.0/bits/basic_string.h \ + /usr/include/c++/5.1.0/ext/atomicity.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/gthr.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h /usr/include/time.h \ + /usr/include/bits/sched.h /usr/include/bits/time.h \ + /usr/include/bits/timex.h /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/setjmp.h \ + /usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/atomic_word.h \ + /usr/include/c++/5.1.0/ext/alloc_traits.h \ + /usr/include/c++/5.1.0/bits/basic_string.tcc cpu_detect.h \ + ../../include/STTypes.h ../../include/soundtouch_config.h \ + /usr/include/libio.h /usr/include/_G_config.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/bits/stdio.h + +/usr/include/stdc-predef.h: + +/usr/include/c++/5.1.0/stdexcept: + +/usr/include/c++/5.1.0/exception: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/c++config.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/os_defines.h: + +/usr/include/features.h: + +/usr/include/sys/cdefs.h: + +/usr/include/bits/wordsize.h: + +/usr/include/gnu/stubs.h: + +/usr/include/gnu/stubs-64.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/cpu_defines.h: + +/usr/include/c++/5.1.0/bits/atomic_lockfree_defines.h: + +/usr/include/c++/5.1.0/string: + +/usr/include/c++/5.1.0/bits/stringfwd.h: + +/usr/include/c++/5.1.0/bits/memoryfwd.h: + +/usr/include/c++/5.1.0/bits/char_traits.h: + +/usr/include/c++/5.1.0/bits/stl_algobase.h: + +/usr/include/c++/5.1.0/bits/functexcept.h: + +/usr/include/c++/5.1.0/bits/exception_defines.h: + +/usr/include/c++/5.1.0/bits/cpp_type_traits.h: + +/usr/include/c++/5.1.0/ext/type_traits.h: + +/usr/include/c++/5.1.0/ext/numeric_traits.h: + +/usr/include/c++/5.1.0/bits/stl_pair.h: + +/usr/include/c++/5.1.0/bits/move.h: + +/usr/include/c++/5.1.0/bits/concept_check.h: + +/usr/include/c++/5.1.0/bits/stl_iterator_base_types.h: + +/usr/include/c++/5.1.0/bits/stl_iterator_base_funcs.h: + +/usr/include/c++/5.1.0/debug/debug.h: + +/usr/include/c++/5.1.0/bits/stl_iterator.h: + +/usr/include/c++/5.1.0/bits/ptr_traits.h: + +/usr/include/c++/5.1.0/bits/predefined_ops.h: + +/usr/include/c++/5.1.0/bits/postypes.h: + +/usr/include/c++/5.1.0/cwchar: + +/usr/include/wchar.h: + +/usr/include/stdio.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/include/stdarg.h: + +/usr/include/bits/wchar.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/include/stddef.h: + +/usr/include/xlocale.h: + +/usr/include/c++/5.1.0/bits/allocator.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/c++allocator.h: + +/usr/include/c++/5.1.0/ext/new_allocator.h: + +/usr/include/c++/5.1.0/new: + +/usr/include/c++/5.1.0/bits/localefwd.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/c++locale.h: + +/usr/include/c++/5.1.0/clocale: + +/usr/include/locale.h: + +/usr/include/bits/locale.h: + +/usr/include/c++/5.1.0/iosfwd: + +/usr/include/c++/5.1.0/cctype: + +/usr/include/ctype.h: + +/usr/include/bits/types.h: + +/usr/include/bits/typesizes.h: + +/usr/include/endian.h: + +/usr/include/bits/endian.h: + +/usr/include/bits/byteswap.h: + +/usr/include/bits/byteswap-16.h: + +/usr/include/c++/5.1.0/bits/ostream_insert.h: + +/usr/include/c++/5.1.0/bits/cxxabi_forced.h: + +/usr/include/c++/5.1.0/bits/stl_function.h: + +/usr/include/c++/5.1.0/backward/binders.h: + +/usr/include/c++/5.1.0/bits/range_access.h: + +/usr/include/c++/5.1.0/bits/basic_string.h: + +/usr/include/c++/5.1.0/ext/atomicity.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/gthr.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/gthr-default.h: + +/usr/include/pthread.h: + +/usr/include/sched.h: + +/usr/include/time.h: + +/usr/include/bits/sched.h: + +/usr/include/bits/time.h: + +/usr/include/bits/timex.h: + +/usr/include/bits/pthreadtypes.h: + +/usr/include/bits/setjmp.h: + +/usr/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/atomic_word.h: + +/usr/include/c++/5.1.0/ext/alloc_traits.h: + +/usr/include/c++/5.1.0/bits/basic_string.tcc: + +cpu_detect.h: + +../../include/STTypes.h: + +../../include/soundtouch_config.h: + +/usr/include/libio.h: + +/usr/include/_G_config.h: + +/usr/include/bits/stdio_lim.h: + +/usr/include/bits/sys_errlist.h: + +/usr/include/bits/stdio.h: diff --git a/pysoundtouch/soundtouch/source/SoundTouch/.deps/mmx_optimized.Plo b/pysoundtouch/soundtouch/source/SoundTouch/.deps/mmx_optimized.Plo new file mode 100644 index 0000000..676554b --- /dev/null +++ b/pysoundtouch/soundtouch/source/SoundTouch/.deps/mmx_optimized.Plo @@ -0,0 +1,8 @@ +mmx_optimized.lo: mmx_optimized.cpp /usr/include/stdc-predef.h \ + ../../include/STTypes.h ../../include/soundtouch_config.h + +/usr/include/stdc-predef.h: + +../../include/STTypes.h: + +../../include/soundtouch_config.h: diff --git a/pysoundtouch/soundtouch/source/SoundTouch/.deps/sse_optimized.Plo b/pysoundtouch/soundtouch/source/SoundTouch/.deps/sse_optimized.Plo new file mode 100644 index 0000000..30298f3 --- /dev/null +++ b/pysoundtouch/soundtouch/source/SoundTouch/.deps/sse_optimized.Plo @@ -0,0 +1,10 @@ +sse_optimized.lo: sse_optimized.cpp /usr/include/stdc-predef.h \ + cpu_detect.h ../../include/STTypes.h ../../include/soundtouch_config.h + +/usr/include/stdc-predef.h: + +cpu_detect.h: + +../../include/STTypes.h: + +../../include/soundtouch_config.h: diff --git a/pysoundtouch/soundtouch/source/SoundTouch/3dnow_win.cpp b/pysoundtouch/soundtouch/source/SoundTouch/3dnow_win.cpp new file mode 100644 index 0000000..f0a9d7e --- /dev/null +++ b/pysoundtouch/soundtouch/source/SoundTouch/3dnow_win.cpp @@ -0,0 +1,349 @@ +//////////////////////////////////////////////////////////////////////////////// +/// +/// Win32 version of the AMD 3DNow! optimized routines for AMD K6-2/Athlon +/// processors. All 3DNow! optimized functions have been gathered into this +/// single source code file, regardless to their class or original source code +/// file, in order to ease porting the library to other compiler and processor +/// platforms. +/// +/// By the way; the performance gain depends heavily on the CPU generation: On +/// K6-2 these routines provided speed-up of even 2.4 times, while on Athlon the +/// difference to the original routines stayed at unremarkable 8%! Such a small +/// improvement on Athlon is due to 3DNow can perform only two operations in +/// parallel, and obviously also the Athlon FPU is doing a very good job with +/// the standard C floating point routines! Here these routines are anyway, +/// although it might not be worth the effort to convert these to GCC platform, +/// for Athlon CPU at least. The situation is different regarding the SSE +/// optimizations though, thanks to the four parallel operations of SSE that +/// already make a difference. +/// +/// This file is to be compiled in Windows platform with Microsoft Visual C++ +/// Compiler. Please see '3dnow_gcc.cpp' for the gcc compiler version for all +/// GNU platforms (if file supplied). +/// +/// NOTICE: If using Visual Studio 6.0, you'll need to install the "Visual C++ +/// 6.0 processor pack" update to support 3DNow! instruction set. The update is +/// available for download at Microsoft Developers Network, see here: +/// http://msdn.microsoft.com/en-us/vstudio/aa718349.aspx +/// +/// If the above URL is expired or removed, go to "http://msdn.microsoft.com" and +/// perform a search with keywords "processor pack". +/// +/// Author : Copyright (c) Olli Parviainen +/// Author e-mail : oparviai 'at' iki.fi +/// SoundTouch WWW: http://www.surina.net/soundtouch +/// +//////////////////////////////////////////////////////////////////////////////// +// +// Last changed : $Date: 2009-02-21 18:00:14 +0200 (Sat, 21 Feb 2009) $ +// File revision : $Revision: 4 $ +// +// $Id: 3dnow_win.cpp 63 2009-02-21 16:00:14Z oparviai $ +// +//////////////////////////////////////////////////////////////////////////////// +// +// License : +// +// SoundTouch audio processing library +// Copyright (c) Olli Parviainen +// +// 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 library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +//////////////////////////////////////////////////////////////////////////////// + +#include "cpu_detect.h" +#include "STTypes.h" + +#ifndef WIN32 +#error "wrong platform - this source code file is exclusively for Win32 platform" +#endif + +using namespace soundtouch; + +#ifdef ALLOW_3DNOW +// 3DNow! routines available only with float sample type + +////////////////////////////////////////////////////////////////////////////// +// +// implementation of 3DNow! optimized functions of class 'TDStretch3DNow' +// +////////////////////////////////////////////////////////////////////////////// + +#include "TDStretch.h" + + +// Calculates cross correlation of two buffers +double TDStretch3DNow::calcCrossCorrStereo(const float *pV1, const float *pV2) const +{ + int overlapLengthLocal = overlapLength; + float corr = 0; + + // Calculates the cross-correlation value between 'pV1' and 'pV2' vectors + /* + c-pseudocode: + + corr = 0; + for (i = 0; i < overlapLength / 4; i ++) + { + corr += pV1[0] * pV2[0]; + pV1[1] * pV2[1]; + pV1[2] * pV2[2]; + pV1[3] * pV2[3]; + pV1[4] * pV2[4]; + pV1[5] * pV2[5]; + pV1[6] * pV2[6]; + pV1[7] * pV2[7]; + + pV1 += 8; + pV2 += 8; + } + */ + + _asm + { + // give prefetch hints to CPU of what data are to be needed soonish. + // give more aggressive hints on pV1 as that changes more between different calls + // while pV2 stays the same. + prefetch [pV1] + prefetch [pV2] + prefetch [pV1 + 32] + + mov eax, dword ptr pV2 + mov ebx, dword ptr pV1 + + pxor mm0, mm0 + + mov ecx, overlapLengthLocal + shr ecx, 2 // div by four + + loop1: + movq mm1, [eax] + prefetch [eax + 32] // give a prefetch hint to CPU what data are to be needed soonish + pfmul mm1, [ebx] + prefetch [ebx + 64] // give a prefetch hint to CPU what data are to be needed soonish + + movq mm2, [eax + 8] + pfadd mm0, mm1 + pfmul mm2, [ebx + 8] + + movq mm3, [eax + 16] + pfadd mm0, mm2 + pfmul mm3, [ebx + 16] + + movq mm4, [eax + 24] + pfadd mm0, mm3 + pfmul mm4, [ebx + 24] + + add eax, 32 + pfadd mm0, mm4 + add ebx, 32 + + dec ecx + jnz loop1 + + // add halfs of mm0 together and return the result. + // note: mm1 is used as a dummy parameter only, we actually don't care about it's value + pfacc mm0, mm1 + movd corr, mm0 + femms + } + + return corr; +} + + + + +////////////////////////////////////////////////////////////////////////////// +// +// implementation of 3DNow! optimized functions of class 'FIRFilter' +// +////////////////////////////////////////////////////////////////////////////// + +#include "FIRFilter.h" + +FIRFilter3DNow::FIRFilter3DNow() : FIRFilter() +{ + filterCoeffsUnalign = NULL; + filterCoeffsAlign = NULL; +} + + +FIRFilter3DNow::~FIRFilter3DNow() +{ + delete[] filterCoeffsUnalign; + filterCoeffsUnalign = NULL; + filterCoeffsAlign = NULL; +} + + +// (overloaded) Calculates filter coefficients for 3DNow! routine +void FIRFilter3DNow::setCoefficients(const float *coeffs, uint newLength, uint uResultDivFactor) +{ + uint i; + float fDivider; + + FIRFilter::setCoefficients(coeffs, newLength, uResultDivFactor); + + // Scale the filter coefficients so that it won't be necessary to scale the filtering result + // also rearrange coefficients suitably for 3DNow! + // Ensure that filter coeffs array is aligned to 16-byte boundary + delete[] filterCoeffsUnalign; + filterCoeffsUnalign = new float[2 * newLength + 4]; + filterCoeffsAlign = (float *)(((uint)filterCoeffsUnalign + 15) & (uint)-16); + + fDivider = (float)resultDivider; + + // rearrange the filter coefficients for mmx routines + for (i = 0; i < newLength; i ++) + { + filterCoeffsAlign[2 * i + 0] = + filterCoeffsAlign[2 * i + 1] = coeffs[i + 0] / fDivider; + } +} + + +// 3DNow!-optimized version of the filter routine for stereo sound +uint FIRFilter3DNow::evaluateFilterStereo(float *dest, const float *src, uint numSamples) const +{ + float *filterCoeffsLocal = filterCoeffsAlign; + uint count = (numSamples - length) & (uint)-2; + uint lengthLocal = length / 4; + + assert(length != 0); + assert(count % 2 == 0); + + /* original code: + + double suml1, suml2; + double sumr1, sumr2; + uint i, j; + + for (j = 0; j < count; j += 2) + { + const float *ptr; + + suml1 = sumr1 = 0.0; + suml2 = sumr2 = 0.0; + ptr = src; + filterCoeffsLocal = filterCoeffs; + for (i = 0; i < lengthLocal; i ++) + { + // unroll loop for efficiency. + + suml1 += ptr[0] * filterCoeffsLocal[0] + + ptr[2] * filterCoeffsLocal[2] + + ptr[4] * filterCoeffsLocal[4] + + ptr[6] * filterCoeffsLocal[6]; + + sumr1 += ptr[1] * filterCoeffsLocal[1] + + ptr[3] * filterCoeffsLocal[3] + + ptr[5] * filterCoeffsLocal[5] + + ptr[7] * filterCoeffsLocal[7]; + + suml2 += ptr[8] * filterCoeffsLocal[0] + + ptr[10] * filterCoeffsLocal[2] + + ptr[12] * filterCoeffsLocal[4] + + ptr[14] * filterCoeffsLocal[6]; + + sumr2 += ptr[9] * filterCoeffsLocal[1] + + ptr[11] * filterCoeffsLocal[3] + + ptr[13] * filterCoeffsLocal[5] + + ptr[15] * filterCoeffsLocal[7]; + + ptr += 16; + filterCoeffsLocal += 8; + } + dest[0] = (float)suml1; + dest[1] = (float)sumr1; + dest[2] = (float)suml2; + dest[3] = (float)sumr2; + + src += 4; + dest += 4; + } + + */ + _asm + { + mov eax, dword ptr dest + mov ebx, dword ptr src + mov edx, count + shr edx, 1 + + loop1: + // "outer loop" : during each round 2*2 output samples are calculated + prefetch [ebx] // give a prefetch hint to CPU what data are to be needed soonish + prefetch [filterCoeffsLocal] // give a prefetch hint to CPU what data are to be needed soonish + + mov esi, ebx + mov edi, filterCoeffsLocal + pxor mm0, mm0 + pxor mm1, mm1 + mov ecx, lengthLocal + + loop2: + // "inner loop" : during each round four FIR filter taps are evaluated for 2*2 output samples + movq mm2, [edi] + movq mm3, mm2 + prefetch [edi + 32] // give a prefetch hint to CPU what data are to be needed soonish + pfmul mm2, [esi] + prefetch [esi + 32] // give a prefetch hint to CPU what data are to be needed soonish + pfmul mm3, [esi + 8] + + movq mm4, [edi + 8] + movq mm5, mm4 + pfadd mm0, mm2 + pfmul mm4, [esi + 8] + pfadd mm1, mm3 + pfmul mm5, [esi + 16] + + movq mm2, [edi + 16] + movq mm6, mm2 + pfadd mm0, mm4 + pfmul mm2, [esi + 16] + pfadd mm1, mm5 + pfmul mm6, [esi + 24] + + movq mm3, [edi + 24] + movq mm7, mm3 + pfadd mm0, mm2 + pfmul mm3, [esi + 24] + pfadd mm1, mm6 + pfmul mm7, [esi + 32] + add esi, 32 + pfadd mm0, mm3 + add edi, 32 + pfadd mm1, mm7 + + dec ecx + jnz loop2 + + movq [eax], mm0 + add ebx, 16 + movq [eax + 8], mm1 + add eax, 16 + + dec edx + jnz loop1 + + femms + } + + return count; +} + + +#endif // ALLOW_3DNOW diff --git a/pysoundtouch/soundtouch/source/SoundTouch/AAFilter.cpp b/pysoundtouch/soundtouch/source/SoundTouch/AAFilter.cpp new file mode 100644 index 0000000..96abda4 --- /dev/null +++ b/pysoundtouch/soundtouch/source/SoundTouch/AAFilter.cpp @@ -0,0 +1,184 @@ +//////////////////////////////////////////////////////////////////////////////// +/// +/// FIR low-pass (anti-alias) filter with filter coefficient design routine and +/// MMX optimization. +/// +/// Anti-alias filter is used to prevent folding of high frequencies when +/// transposing the sample rate with interpolation. +/// +/// Author : Copyright (c) Olli Parviainen +/// Author e-mail : oparviai 'at' iki.fi +/// SoundTouch WWW: http://www.surina.net/soundtouch +/// +//////////////////////////////////////////////////////////////////////////////// +// +// Last changed : $Date: 2009-01-11 13:34:24 +0200 (Sun, 11 Jan 2009) $ +// File revision : $Revision: 4 $ +// +// $Id: AAFilter.cpp 45 2009-01-11 11:34:24Z oparviai $ +// +//////////////////////////////////////////////////////////////////////////////// +// +// License : +// +// SoundTouch audio processing library +// Copyright (c) Olli Parviainen +// +// 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 library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +//////////////////////////////////////////////////////////////////////////////// + +#include +#include +#include +#include +#include "AAFilter.h" +#include "FIRFilter.h" + +using namespace soundtouch; + +#define PI 3.141592655357989 +#define TWOPI (2 * PI) + +/***************************************************************************** + * + * Implementation of the class 'AAFilter' + * + *****************************************************************************/ + +AAFilter::AAFilter(uint len) +{ + pFIR = FIRFilter::newInstance(); + cutoffFreq = 0.5; + setLength(len); +} + + + +AAFilter::~AAFilter() +{ + delete pFIR; +} + + + +// Sets new anti-alias filter cut-off edge frequency, scaled to +// sampling frequency (nyquist frequency = 0.5). +// The filter will cut frequencies higher than the given frequency. +void AAFilter::setCutoffFreq(double newCutoffFreq) +{ + cutoffFreq = newCutoffFreq; + calculateCoeffs(); +} + + + +// Sets number of FIR filter taps +void AAFilter::setLength(uint newLength) +{ + length = newLength; + calculateCoeffs(); +} + + + +// Calculates coefficients for a low-pass FIR filter using Hamming window +void AAFilter::calculateCoeffs() +{ + uint i; + double cntTemp, temp, tempCoeff,h, w; + double fc2, wc; + double scaleCoeff, sum; + double *work; + SAMPLETYPE *coeffs; + + assert(length >= 2); + assert(length % 4 == 0); + assert(cutoffFreq >= 0); + assert(cutoffFreq <= 0.5); + + work = new double[length]; + coeffs = new SAMPLETYPE[length]; + + fc2 = 2.0 * cutoffFreq; + wc = PI * fc2; + tempCoeff = TWOPI / (double)length; + + sum = 0; + for (i = 0; i < length; i ++) + { + cntTemp = (double)i - (double)(length / 2); + + temp = cntTemp * wc; + if (temp != 0) + { + h = fc2 * sin(temp) / temp; // sinc function + } + else + { + h = 1.0; + } + w = 0.54 + 0.46 * cos(tempCoeff * cntTemp); // hamming window + + temp = w * h; + work[i] = temp; + + // calc net sum of coefficients + sum += temp; + } + + // ensure the sum of coefficients is larger than zero + assert(sum > 0); + + // ensure we've really designed a lowpass filter... + assert(work[length/2] > 0); + assert(work[length/2 + 1] > -1e-6); + assert(work[length/2 - 1] > -1e-6); + + // Calculate a scaling coefficient in such a way that the result can be + // divided by 16384 + scaleCoeff = 16384.0f / sum; + + for (i = 0; i < length; i ++) + { + // scale & round to nearest integer + temp = work[i] * scaleCoeff; + temp += (temp >= 0) ? 0.5 : -0.5; + // ensure no overfloods + assert(temp >= -32768 && temp <= 32767); + coeffs[i] = (SAMPLETYPE)temp; + } + + // Set coefficients. Use divide factor 14 => divide result by 2^14 = 16384 + pFIR->setCoefficients(coeffs, length, 14); + + delete[] work; + delete[] coeffs; +} + + +// Applies the filter to the given sequence of samples. +// Note : The amount of outputted samples is by value of 'filter length' +// smaller than the amount of input samples. +uint AAFilter::evaluate(SAMPLETYPE *dest, const SAMPLETYPE *src, uint numSamples, uint numChannels) const +{ + return pFIR->evaluate(dest, src, numSamples, numChannels); +} + + +uint AAFilter::getLength() const +{ + return pFIR->getLength(); +} diff --git a/pysoundtouch/soundtouch/source/SoundTouch/AAFilter.h b/pysoundtouch/soundtouch/source/SoundTouch/AAFilter.h new file mode 100644 index 0000000..d5c8ce4 --- /dev/null +++ b/pysoundtouch/soundtouch/source/SoundTouch/AAFilter.h @@ -0,0 +1,91 @@ +//////////////////////////////////////////////////////////////////////////////// +/// +/// Sampled sound tempo changer/time stretch algorithm. Changes the sound tempo +/// while maintaining the original pitch by using a time domain WSOLA-like method +/// with several performance-increasing tweaks. +/// +/// Anti-alias filter is used to prevent folding of high frequencies when +/// transposing the sample rate with interpolation. +/// +/// Author : Copyright (c) Olli Parviainen +/// Author e-mail : oparviai 'at' iki.fi +/// SoundTouch WWW: http://www.surina.net/soundtouch +/// +//////////////////////////////////////////////////////////////////////////////// +// +// Last changed : $Date: 2008-02-10 18:26:55 +0200 (Sun, 10 Feb 2008) $ +// File revision : $Revision: 4 $ +// +// $Id: AAFilter.h 11 2008-02-10 16:26:55Z oparviai $ +// +//////////////////////////////////////////////////////////////////////////////// +// +// License : +// +// SoundTouch audio processing library +// Copyright (c) Olli Parviainen +// +// 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 library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +//////////////////////////////////////////////////////////////////////////////// + +#ifndef AAFilter_H +#define AAFilter_H + +#include "STTypes.h" + +namespace soundtouch +{ + +class AAFilter +{ +protected: + class FIRFilter *pFIR; + + /// Low-pass filter cut-off frequency, negative = invalid + double cutoffFreq; + + /// num of filter taps + uint length; + + /// Calculate the FIR coefficients realizing the given cutoff-frequency + void calculateCoeffs(); +public: + AAFilter(uint length); + + ~AAFilter(); + + /// Sets new anti-alias filter cut-off edge frequency, scaled to sampling + /// frequency (nyquist frequency = 0.5). The filter will cut off the + /// frequencies than that. + void setCutoffFreq(double newCutoffFreq); + + /// Sets number of FIR filter taps, i.e. ~filter complexity + void setLength(uint newLength); + + uint getLength() const; + + /// Applies the filter to the given sequence of samples. + /// Note : The amount of outputted samples is by value of 'filter length' + /// smaller than the amount of input samples. + uint evaluate(SAMPLETYPE *dest, + const SAMPLETYPE *src, + uint numSamples, + uint numChannels) const; +}; + +} + +#endif diff --git a/pysoundtouch/soundtouch/source/SoundTouch/BPMDetect.cpp b/pysoundtouch/soundtouch/source/SoundTouch/BPMDetect.cpp new file mode 100644 index 0000000..4e7d386 --- /dev/null +++ b/pysoundtouch/soundtouch/source/SoundTouch/BPMDetect.cpp @@ -0,0 +1,311 @@ +//////////////////////////////////////////////////////////////////////////////// +/// +/// Beats-per-minute (BPM) detection routine. +/// +/// The beat detection algorithm works as follows: +/// - Use function 'inputSamples' to input a chunks of samples to the class for +/// analysis. It's a good idea to enter a large sound file or stream in smallish +/// chunks of around few kilosamples in order not to extinguish too much RAM memory. +/// - Inputted sound data is decimated to approx 500 Hz to reduce calculation burden, +/// which is basically ok as low (bass) frequencies mostly determine the beat rate. +/// Simple averaging is used for anti-alias filtering because the resulting signal +/// quality isn't of that high importance. +/// - Decimated sound data is enveloped, i.e. the amplitude shape is detected by +/// taking absolute value that's smoothed by sliding average. Signal levels that +/// are below a couple of times the general RMS amplitude level are cut away to +/// leave only notable peaks there. +/// - Repeating sound patterns (e.g. beats) are detected by calculating short-term +/// autocorrelation function of the enveloped signal. +/// - After whole sound data file has been analyzed as above, the bpm level is +/// detected by function 'getBpm' that finds the highest peak of the autocorrelation +/// function, calculates it's precise location and converts this reading to bpm's. +/// +/// Author : Copyright (c) Olli Parviainen +/// Author e-mail : oparviai 'at' iki.fi +/// SoundTouch WWW: http://www.surina.net/soundtouch +/// +//////////////////////////////////////////////////////////////////////////////// +// +// Last changed : $Date: 2009-02-21 18:00:14 +0200 (Sat, 21 Feb 2009) $ +// File revision : $Revision: 4 $ +// +// $Id: BPMDetect.cpp 63 2009-02-21 16:00:14Z oparviai $ +// +//////////////////////////////////////////////////////////////////////////////// +// +// License : +// +// SoundTouch audio processing library +// Copyright (c) Olli Parviainen +// +// 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 library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +//////////////////////////////////////////////////////////////////////////////// + +#include +#include +#include +#include +#include "FIFOSampleBuffer.h" +#include "PeakFinder.h" +#include "BPMDetect.h" + +using namespace soundtouch; + +#define INPUT_BLOCK_SAMPLES 2048 +#define DECIMATED_BLOCK_SAMPLES 256 +#define RESOL_FACTOR 1 + +/// decay constant for calculating RMS volume sliding average approximation +/// (time constant is about 10 sec) +const float avgdecay = 0.99986f; + +/// Normalization coefficient for calculating RMS sliding average approximation. +const float avgnorm = (1 - avgdecay); + + + +BPMDetect::BPMDetect(int numChannels, int aSampleRate) +{ + this->sampleRate = aSampleRate; + this->channels = numChannels; + + decimateSum = 0; + decimateCount = 0; + + envelopeAccu = 0; + + // Initialize RMS volume accumulator to RMS level of 3000 (out of 32768) that's + // a typical RMS signal level value for song data. This value is then adapted + // to the actual level during processing. +#ifdef INTEGER_SAMPLES + // integer samples + RMSVolumeAccu = (3000 * 3000) / avgnorm; +#else + // float samples, scaled to range [-1..+1[ + RMSVolumeAccu = (0.092f * 0.092f) / avgnorm; +#endif + + // choose decimation factor so that result is approx. 500 Hz + decimateBy = sampleRate / (500 * RESOL_FACTOR); + assert(decimateBy > 0); + assert(INPUT_BLOCK_SAMPLES < decimateBy * DECIMATED_BLOCK_SAMPLES); + + // Calculate window length & starting item according to desired min & max bpms + windowLen = (60 * sampleRate) / (decimateBy * MIN_BPM); + windowStart = (60 * sampleRate) / (decimateBy * MAX_BPM); + + assert(windowLen > windowStart); + + // allocate new working objects + xcorr = new float[windowLen]; + memset(xcorr, 0, windowLen * sizeof(float)); + + // allocate processing buffer + buffer = new FIFOSampleBuffer(); + // we do processing in mono mode + buffer->setChannels(1); + buffer->clear(); +} + + + +BPMDetect::~BPMDetect() +{ + delete[] xcorr; + delete buffer; +} + + + +/// convert to mono, low-pass filter & decimate to about 500 Hz. +/// return number of outputted samples. +/// +/// Decimation is used to remove the unnecessary frequencies and thus to reduce +/// the amount of data needed to be processed as calculating autocorrelation +/// function is a very-very heavy operation. +/// +/// Anti-alias filtering is done simply by averaging the samples. This is really a +/// poor-man's anti-alias filtering, but it's not so critical in this kind of application +/// (it'd also be difficult to design a high-quality filter with steep cut-off at very +/// narrow band) +int BPMDetect::decimate(SAMPLETYPE *dest, const SAMPLETYPE *src, int numsamples) +{ + int count, outcount; + LONG_SAMPLETYPE out; + + assert(channels > 0); + assert(decimateBy > 0); + outcount = 0; + for (count = 0; count < numsamples; count ++) + { + int j; + + // convert to mono and accumulate + for (j = 0; j < channels; j ++) + { + decimateSum += src[j]; + } + src += j; + + decimateCount ++; + if (decimateCount >= decimateBy) + { + // Store every Nth sample only + out = (LONG_SAMPLETYPE)(decimateSum / (decimateBy * channels)); + decimateSum = 0; + decimateCount = 0; +#ifdef INTEGER_SAMPLES + // check ranges for sure (shouldn't actually be necessary) + if (out > 32767) + { + out = 32767; + } + else if (out < -32768) + { + out = -32768; + } +#endif // INTEGER_SAMPLES + dest[outcount] = (SAMPLETYPE)out; + outcount ++; + } + } + return outcount; +} + + + +// Calculates autocorrelation function of the sample history buffer +void BPMDetect::updateXCorr(int process_samples) +{ + int offs; + SAMPLETYPE *pBuffer; + + assert(buffer->numSamples() >= (uint)(process_samples + windowLen)); + + pBuffer = buffer->ptrBegin(); + for (offs = windowStart; offs < windowLen; offs ++) + { + LONG_SAMPLETYPE sum; + int i; + + sum = 0; + for (i = 0; i < process_samples; i ++) + { + sum += pBuffer[i] * pBuffer[i + offs]; // scaling the sub-result shouldn't be necessary + } +// xcorr[offs] *= xcorr_decay; // decay 'xcorr' here with suitable coefficients + // if it's desired that the system adapts automatically to + // various bpms, e.g. in processing continouos music stream. + // The 'xcorr_decay' should be a value that's smaller than but + // close to one, and should also depend on 'process_samples' value. + + xcorr[offs] += (float)sum; + } +} + + + +// Calculates envelope of the sample data +void BPMDetect::calcEnvelope(SAMPLETYPE *samples, int numsamples) +{ + const float decay = 0.7f; // decay constant for smoothing the envelope + const float norm = (1 - decay); + + int i; + LONG_SAMPLETYPE out; + float val; + + for (i = 0; i < numsamples; i ++) + { + // calc average RMS volume + RMSVolumeAccu *= avgdecay; + val = (float)fabs((float)samples[i]); + RMSVolumeAccu += val * val; + + // cut amplitudes that are below 2 times average RMS volume + // (we're interested in peak values, not the silent moments) + val -= 2 * (float)sqrt(RMSVolumeAccu * avgnorm); + val = (val > 0) ? val : 0; + + // smooth amplitude envelope + envelopeAccu *= decay; + envelopeAccu += val; + out = (LONG_SAMPLETYPE)(envelopeAccu * norm); + +#ifdef INTEGER_SAMPLES + // cut peaks (shouldn't be necessary though) + if (out > 32767) out = 32767; +#endif // INTEGER_SAMPLES + samples[i] = (SAMPLETYPE)out; + } +} + + + +void BPMDetect::inputSamples(const SAMPLETYPE *samples, int numSamples) +{ + SAMPLETYPE decimated[DECIMATED_BLOCK_SAMPLES]; + + // iterate so that max INPUT_BLOCK_SAMPLES processed per iteration + while (numSamples > 0) + { + int block; + int decSamples; + + block = (numSamples > INPUT_BLOCK_SAMPLES) ? INPUT_BLOCK_SAMPLES : numSamples; + + // decimate. note that converts to mono at the same time + decSamples = decimate(decimated, samples, block); + samples += block * channels; + numSamples -= block; + + // envelope new samples and add them to buffer + calcEnvelope(decimated, decSamples); + buffer->putSamples(decimated, decSamples); + } + + // when the buffer has enought samples for processing... + if ((int)buffer->numSamples() > windowLen) + { + int processLength; + + // how many samples are processed + processLength = (int)buffer->numSamples() - windowLen; + + // ... calculate autocorrelations for oldest samples... + updateXCorr(processLength); + // ... and remove them from the buffer + buffer->receiveSamples(processLength); + } +} + + + +float BPMDetect::getBpm() +{ + double peakPos; + PeakFinder peakFinder; + + // find peak position + peakPos = peakFinder.detectPeak(xcorr, windowStart, windowLen, 1); + printf("HERE: %lf\n", peakPos); + + assert(decimateBy != 0); + if (peakPos < 1e-6) return 0.0; // detection failed. + + // calculate BPM + return (float)(60.0 * (((double)sampleRate / (double)decimateBy) / peakPos)); +} diff --git a/pysoundtouch/soundtouch/source/SoundTouch/FIFOSampleBuffer.cpp b/pysoundtouch/soundtouch/source/SoundTouch/FIFOSampleBuffer.cpp new file mode 100644 index 0000000..01f64b0 --- /dev/null +++ b/pysoundtouch/soundtouch/source/SoundTouch/FIFOSampleBuffer.cpp @@ -0,0 +1,262 @@ +//////////////////////////////////////////////////////////////////////////////// +/// +/// A buffer class for temporarily storaging sound samples, operates as a +/// first-in-first-out pipe. +/// +/// Samples are added to the end of the sample buffer with the 'putSamples' +/// function, and are received from the beginning of the buffer by calling +/// the 'receiveSamples' function. The class automatically removes the +/// outputted samples from the buffer, as well as grows the buffer size +/// whenever necessary. +/// +/// Author : Copyright (c) Olli Parviainen +/// Author e-mail : oparviai 'at' iki.fi +/// SoundTouch WWW: http://www.surina.net/soundtouch +/// +//////////////////////////////////////////////////////////////////////////////// +// +// Last changed : $Date: 2009-02-27 19:24:42 +0200 (Fri, 27 Feb 2009) $ +// File revision : $Revision: 4 $ +// +// $Id: FIFOSampleBuffer.cpp 68 2009-02-27 17:24:42Z oparviai $ +// +//////////////////////////////////////////////////////////////////////////////// +// +// License : +// +// SoundTouch audio processing library +// Copyright (c) Olli Parviainen +// +// 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 library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +//////////////////////////////////////////////////////////////////////////////// + +#include +#include +#include +#include +#include + +#include "FIFOSampleBuffer.h" + +using namespace soundtouch; + +// Constructor +FIFOSampleBuffer::FIFOSampleBuffer(int numChannels) +{ + assert(numChannels > 0); + sizeInBytes = 0; // reasonable initial value + buffer = NULL; + bufferUnaligned = NULL; + samplesInBuffer = 0; + bufferPos = 0; + channels = (uint)numChannels; + ensureCapacity(32); // allocate initial capacity +} + + +// destructor +FIFOSampleBuffer::~FIFOSampleBuffer() +{ + delete[] bufferUnaligned; + bufferUnaligned = NULL; + buffer = NULL; +} + + +// Sets number of channels, 1 = mono, 2 = stereo +void FIFOSampleBuffer::setChannels(int numChannels) +{ + uint usedBytes; + + assert(numChannels > 0); + usedBytes = channels * samplesInBuffer; + channels = (uint)numChannels; + samplesInBuffer = usedBytes / channels; +} + + +// if output location pointer 'bufferPos' isn't zero, 'rewinds' the buffer and +// zeroes this pointer by copying samples from the 'bufferPos' pointer +// location on to the beginning of the buffer. +void FIFOSampleBuffer::rewind() +{ + if (buffer && bufferPos) + { + memmove(buffer, ptrBegin(), sizeof(SAMPLETYPE) * channels * samplesInBuffer); + bufferPos = 0; + } +} + + +// Adds 'numSamples' pcs of samples from the 'samples' memory position to +// the sample buffer. +void FIFOSampleBuffer::putSamples(const SAMPLETYPE *samples, uint nSamples) +{ + memcpy(ptrEnd(nSamples), samples, sizeof(SAMPLETYPE) * nSamples * channels); + samplesInBuffer += nSamples; +} + + +// Increases the number of samples in the buffer without copying any actual +// samples. +// +// This function is used to update the number of samples in the sample buffer +// when accessing the buffer directly with 'ptrEnd' function. Please be +// careful though! +void FIFOSampleBuffer::putSamples(uint nSamples) +{ + uint req; + + req = samplesInBuffer + nSamples; + ensureCapacity(req); + samplesInBuffer += nSamples; +} + + +// Returns a pointer to the end of the used part of the sample buffer (i.e. +// where the new samples are to be inserted). This function may be used for +// inserting new samples into the sample buffer directly. Please be careful! +// +// Parameter 'slackCapacity' tells the function how much free capacity (in +// terms of samples) there _at least_ should be, in order to the caller to +// succesfully insert all the required samples to the buffer. When necessary, +// the function grows the buffer size to comply with this requirement. +// +// When using this function as means for inserting new samples, also remember +// to increase the sample count afterwards, by calling the +// 'putSamples(numSamples)' function. +SAMPLETYPE *FIFOSampleBuffer::ptrEnd(uint slackCapacity) +{ + ensureCapacity(samplesInBuffer + slackCapacity); + return buffer + samplesInBuffer * channels; +} + + +// Returns a pointer to the beginning of the currently non-outputted samples. +// This function is provided for accessing the output samples directly. +// Please be careful! +// +// When using this function to output samples, also remember to 'remove' the +// outputted samples from the buffer by calling the +// 'receiveSamples(numSamples)' function +SAMPLETYPE *FIFOSampleBuffer::ptrBegin() +{ + assert(buffer); + return buffer + bufferPos * channels; +} + + +// Ensures that the buffer has enought capacity, i.e. space for _at least_ +// 'capacityRequirement' number of samples. The buffer is grown in steps of +// 4 kilobytes to eliminate the need for frequently growing up the buffer, +// as well as to round the buffer size up to the virtual memory page size. +void FIFOSampleBuffer::ensureCapacity(uint capacityRequirement) +{ + SAMPLETYPE *tempUnaligned, *temp; + + if (capacityRequirement > getCapacity()) + { + // enlarge the buffer in 4kbyte steps (round up to next 4k boundary) + sizeInBytes = (capacityRequirement * channels * sizeof(SAMPLETYPE) + 4095) & (uint)-4096; + assert(sizeInBytes % 2 == 0); + tempUnaligned = new SAMPLETYPE[sizeInBytes / sizeof(SAMPLETYPE) + 16 / sizeof(SAMPLETYPE)]; + if (tempUnaligned == NULL) + { + throw std::runtime_error("Couldn't allocate memory!\n"); + } + // Align the buffer to begin at 16byte cache line boundary for optimal performance + temp = (SAMPLETYPE *)(((ulong)tempUnaligned + 15) & (ulong)-16); + if (samplesInBuffer) + { + memcpy(temp, ptrBegin(), samplesInBuffer * channels * sizeof(SAMPLETYPE)); + } + delete[] bufferUnaligned; + buffer = temp; + bufferUnaligned = tempUnaligned; + bufferPos = 0; + } + else + { + // simply rewind the buffer (if necessary) + rewind(); + } +} + + +// Returns the current buffer capacity in terms of samples +uint FIFOSampleBuffer::getCapacity() const +{ + return sizeInBytes / (channels * sizeof(SAMPLETYPE)); +} + + +// Returns the number of samples currently in the buffer +uint FIFOSampleBuffer::numSamples() const +{ + return samplesInBuffer; +} + + +// Output samples from beginning of the sample buffer. Copies demanded number +// of samples to output and removes them from the sample buffer. If there +// are less than 'numsample' samples in the buffer, returns all available. +// +// Returns number of samples copied. +uint FIFOSampleBuffer::receiveSamples(SAMPLETYPE *output, uint maxSamples) +{ + uint num; + + num = (maxSamples > samplesInBuffer) ? samplesInBuffer : maxSamples; + + memcpy(output, ptrBegin(), channels * sizeof(SAMPLETYPE) * num); + return receiveSamples(num); +} + + +// Removes samples from the beginning of the sample buffer without copying them +// anywhere. Used to reduce the number of samples in the buffer, when accessing +// the sample buffer with the 'ptrBegin' function. +uint FIFOSampleBuffer::receiveSamples(uint maxSamples) +{ + if (maxSamples >= samplesInBuffer) + { + uint temp; + + temp = samplesInBuffer; + samplesInBuffer = 0; + return temp; + } + + samplesInBuffer -= maxSamples; + bufferPos += maxSamples; + + return maxSamples; +} + + +// Returns nonzero if the sample buffer is empty +int FIFOSampleBuffer::isEmpty() const +{ + return (samplesInBuffer == 0) ? 1 : 0; +} + + +// Clears the sample buffer +void FIFOSampleBuffer::clear() +{ + samplesInBuffer = 0; + bufferPos = 0; +} diff --git a/pysoundtouch/soundtouch/source/SoundTouch/FIRFilter.cpp b/pysoundtouch/soundtouch/source/SoundTouch/FIRFilter.cpp new file mode 100644 index 0000000..231263a --- /dev/null +++ b/pysoundtouch/soundtouch/source/SoundTouch/FIRFilter.cpp @@ -0,0 +1,269 @@ +//////////////////////////////////////////////////////////////////////////////// +/// +/// General FIR digital filter routines with MMX optimization. +/// +/// Note : MMX optimized functions reside in a separate, platform-specific file, +/// e.g. 'mmx_win.cpp' or 'mmx_gcc.cpp' +/// +/// Author : Copyright (c) Olli Parviainen +/// Author e-mail : oparviai 'at' iki.fi +/// SoundTouch WWW: http://www.surina.net/soundtouch +/// +//////////////////////////////////////////////////////////////////////////////// +// +// Last changed : $Date: 2009-02-25 19:13:51 +0200 (Wed, 25 Feb 2009) $ +// File revision : $Revision: 4 $ +// +// $Id: FIRFilter.cpp 67 2009-02-25 17:13:51Z oparviai $ +// +//////////////////////////////////////////////////////////////////////////////// +// +// License : +// +// SoundTouch audio processing library +// Copyright (c) Olli Parviainen +// +// 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 library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +//////////////////////////////////////////////////////////////////////////////// + +#include +#include +#include +#include +#include +#include "FIRFilter.h" +#include "cpu_detect.h" + +using namespace soundtouch; + +/***************************************************************************** + * + * Implementation of the class 'FIRFilter' + * + *****************************************************************************/ + +FIRFilter::FIRFilter() +{ + resultDivFactor = 0; + resultDivider = 0; + length = 0; + lengthDiv8 = 0; + filterCoeffs = NULL; +} + + +FIRFilter::~FIRFilter() +{ + delete[] filterCoeffs; +} + +// Usual C-version of the filter routine for stereo sound +uint FIRFilter::evaluateFilterStereo(SAMPLETYPE *dest, const SAMPLETYPE *src, uint numSamples) const +{ + uint i, j, end; + LONG_SAMPLETYPE suml, sumr; +#ifdef FLOAT_SAMPLES + // when using floating point samples, use a scaler instead of a divider + // because division is much slower operation than multiplying. + double dScaler = 1.0 / (double)resultDivider; +#endif + + assert(length != 0); + assert(src != NULL); + assert(dest != NULL); + assert(filterCoeffs != NULL); + + end = 2 * (numSamples - length); + + for (j = 0; j < end; j += 2) + { + const SAMPLETYPE *ptr; + + suml = sumr = 0; + ptr = src + j; + + for (i = 0; i < length; i += 4) + { + // loop is unrolled by factor of 4 here for efficiency + suml += ptr[2 * i + 0] * filterCoeffs[i + 0] + + ptr[2 * i + 2] * filterCoeffs[i + 1] + + ptr[2 * i + 4] * filterCoeffs[i + 2] + + ptr[2 * i + 6] * filterCoeffs[i + 3]; + sumr += ptr[2 * i + 1] * filterCoeffs[i + 0] + + ptr[2 * i + 3] * filterCoeffs[i + 1] + + ptr[2 * i + 5] * filterCoeffs[i + 2] + + ptr[2 * i + 7] * filterCoeffs[i + 3]; + } + +#ifdef INTEGER_SAMPLES + suml >>= resultDivFactor; + sumr >>= resultDivFactor; + // saturate to 16 bit integer limits + suml = (suml < -32768) ? -32768 : (suml > 32767) ? 32767 : suml; + // saturate to 16 bit integer limits + sumr = (sumr < -32768) ? -32768 : (sumr > 32767) ? 32767 : sumr; +#else + suml *= dScaler; + sumr *= dScaler; +#endif // INTEGER_SAMPLES + dest[j] = (SAMPLETYPE)suml; + dest[j + 1] = (SAMPLETYPE)sumr; + } + return numSamples - length; +} + + + + +// Usual C-version of the filter routine for mono sound +uint FIRFilter::evaluateFilterMono(SAMPLETYPE *dest, const SAMPLETYPE *src, uint numSamples) const +{ + uint i, j, end; + LONG_SAMPLETYPE sum; +#ifdef FLOAT_SAMPLES + // when using floating point samples, use a scaler instead of a divider + // because division is much slower operation than multiplying. + double dScaler = 1.0 / (double)resultDivider; +#endif + + + assert(length != 0); + + end = numSamples - length; + for (j = 0; j < end; j ++) + { + sum = 0; + for (i = 0; i < length; i += 4) + { + // loop is unrolled by factor of 4 here for efficiency + sum += src[i + 0] * filterCoeffs[i + 0] + + src[i + 1] * filterCoeffs[i + 1] + + src[i + 2] * filterCoeffs[i + 2] + + src[i + 3] * filterCoeffs[i + 3]; + } +#ifdef INTEGER_SAMPLES + sum >>= resultDivFactor; + // saturate to 16 bit integer limits + sum = (sum < -32768) ? -32768 : (sum > 32767) ? 32767 : sum; +#else + sum *= dScaler; +#endif // INTEGER_SAMPLES + dest[j] = (SAMPLETYPE)sum; + src ++; + } + return end; +} + + +// Set filter coeffiecients and length. +// +// Throws an exception if filter length isn't divisible by 8 +void FIRFilter::setCoefficients(const SAMPLETYPE *coeffs, uint newLength, uint uResultDivFactor) +{ + assert(newLength > 0); + if (newLength % 8) throw std::runtime_error("FIR filter length not divisible by 8"); + + lengthDiv8 = newLength / 8; + length = lengthDiv8 * 8; + assert(length == newLength); + + resultDivFactor = uResultDivFactor; + resultDivider = (SAMPLETYPE)::pow(2.0, (int)resultDivFactor); + + delete[] filterCoeffs; + filterCoeffs = new SAMPLETYPE[length]; + memcpy(filterCoeffs, coeffs, length * sizeof(SAMPLETYPE)); +} + + +uint FIRFilter::getLength() const +{ + return length; +} + + + +// Applies the filter to the given sequence of samples. +// +// Note : The amount of outputted samples is by value of 'filter_length' +// smaller than the amount of input samples. +uint FIRFilter::evaluate(SAMPLETYPE *dest, const SAMPLETYPE *src, uint numSamples, uint numChannels) const +{ + assert(numChannels == 1 || numChannels == 2); + + assert(length > 0); + assert(lengthDiv8 * 8 == length); + if (numSamples < length) return 0; + if (numChannels == 2) + { + return evaluateFilterStereo(dest, src, numSamples); + } else { + return evaluateFilterMono(dest, src, numSamples); + } +} + + + +// Operator 'new' is overloaded so that it automatically creates a suitable instance +// depending on if we've a MMX-capable CPU available or not. +void * FIRFilter::operator new(size_t s) +{ + // Notice! don't use "new FIRFilter" directly, use "newInstance" to create a new instance instead! + throw std::runtime_error("Error in FIRFilter::new: Don't use 'new FIRFilter', use 'newInstance' member instead!"); + return NULL; +} + + +FIRFilter * FIRFilter::newInstance() +{ + uint uExtensions; + + uExtensions = detectCPUextensions(); + + // Check if MMX/SSE/3DNow! instruction set extensions supported by CPU + +#ifdef ALLOW_MMX + // MMX routines available only with integer sample types + if (uExtensions & SUPPORT_MMX) + { + return ::new FIRFilterMMX; + } + else +#endif // ALLOW_MMX + +#ifdef ALLOW_SSE + if (uExtensions & SUPPORT_SSE) + { + // SSE support + return ::new FIRFilterSSE; + } + else +#endif // ALLOW_SSE + +#ifdef ALLOW_3DNOW + if (uExtensions & SUPPORT_3DNOW) + { + // 3DNow! support + return ::new FIRFilter3DNow; + } + else +#endif // ALLOW_3DNOW + + { + // ISA optimizations not supported, use plain C version + return ::new FIRFilter; + } +} diff --git a/pysoundtouch/soundtouch/source/SoundTouch/FIRFilter.h b/pysoundtouch/soundtouch/source/SoundTouch/FIRFilter.h new file mode 100644 index 0000000..5713f7b --- /dev/null +++ b/pysoundtouch/soundtouch/source/SoundTouch/FIRFilter.h @@ -0,0 +1,164 @@ +//////////////////////////////////////////////////////////////////////////////// +/// +/// General FIR digital filter routines with MMX optimization. +/// +/// Note : MMX optimized functions reside in a separate, platform-specific file, +/// e.g. 'mmx_win.cpp' or 'mmx_gcc.cpp' +/// +/// Author : Copyright (c) Olli Parviainen +/// Author e-mail : oparviai 'at' iki.fi +/// SoundTouch WWW: http://www.surina.net/soundtouch +/// +//////////////////////////////////////////////////////////////////////////////// +// +// Last changed : $Date: 2009-02-21 18:00:14 +0200 (Sat, 21 Feb 2009) $ +// File revision : $Revision: 4 $ +// +// $Id: FIRFilter.h 63 2009-02-21 16:00:14Z oparviai $ +// +//////////////////////////////////////////////////////////////////////////////// +// +// License : +// +// SoundTouch audio processing library +// Copyright (c) Olli Parviainen +// +// 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 library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +//////////////////////////////////////////////////////////////////////////////// + +#ifndef FIRFilter_H +#define FIRFilter_H + +#include +#include "STTypes.h" + +namespace soundtouch +{ + +class FIRFilter +{ +protected: + // Number of FIR filter taps + uint length; + // Number of FIR filter taps divided by 8 + uint lengthDiv8; + + // Result divider factor in 2^k format + uint resultDivFactor; + + // Result divider value. + SAMPLETYPE resultDivider; + + // Memory for filter coefficients + SAMPLETYPE *filterCoeffs; + + virtual uint evaluateFilterStereo(SAMPLETYPE *dest, + const SAMPLETYPE *src, + uint numSamples) const; + virtual uint evaluateFilterMono(SAMPLETYPE *dest, + const SAMPLETYPE *src, + uint numSamples) const; + +public: + FIRFilter(); + virtual ~FIRFilter(); + + /// Operator 'new' is overloaded so that it automatically creates a suitable instance + /// depending on if we've a MMX-capable CPU available or not. + static void * operator new(size_t s); + + static FIRFilter *newInstance(); + + /// Applies the filter to the given sequence of samples. + /// Note : The amount of outputted samples is by value of 'filter_length' + /// smaller than the amount of input samples. + /// + /// \return Number of samples copied to 'dest'. + uint evaluate(SAMPLETYPE *dest, + const SAMPLETYPE *src, + uint numSamples, + uint numChannels) const; + + uint getLength() const; + + virtual void setCoefficients(const SAMPLETYPE *coeffs, + uint newLength, + uint uResultDivFactor); +}; + + +// Optional subclasses that implement CPU-specific optimizations: + +#ifdef ALLOW_MMX + +/// Class that implements MMX optimized functions exclusive for 16bit integer samples type. + class FIRFilterMMX : public FIRFilter + { + protected: + short *filterCoeffsUnalign; + short *filterCoeffsAlign; + + virtual uint evaluateFilterStereo(short *dest, const short *src, uint numSamples) const; + public: + FIRFilterMMX(); + ~FIRFilterMMX(); + + virtual void setCoefficients(const short *coeffs, uint newLength, uint uResultDivFactor); + }; + +#endif // ALLOW_MMX + + +#ifdef ALLOW_3DNOW + + /// Class that implements 3DNow! optimized functions exclusive for floating point samples type. + class FIRFilter3DNow : public FIRFilter + { + protected: + float *filterCoeffsUnalign; + float *filterCoeffsAlign; + + virtual uint evaluateFilterStereo(float *dest, const float *src, uint numSamples) const; + public: + FIRFilter3DNow(); + ~FIRFilter3DNow(); + virtual void setCoefficients(const float *coeffs, uint newLength, uint uResultDivFactor); + }; + +#endif // ALLOW_3DNOW + + +#ifdef ALLOW_SSE + /// Class that implements SSE optimized functions exclusive for floating point samples type. + class FIRFilterSSE : public FIRFilter + { + protected: + float *filterCoeffsUnalign; + float *filterCoeffsAlign; + + virtual uint evaluateFilterStereo(float *dest, const float *src, uint numSamples) const; + public: + FIRFilterSSE(); + ~FIRFilterSSE(); + + virtual void setCoefficients(const float *coeffs, uint newLength, uint uResultDivFactor); + }; + +#endif // ALLOW_SSE + +} + +#endif // FIRFilter_H diff --git a/pysoundtouch/soundtouch/source/SoundTouch/Makefile b/pysoundtouch/soundtouch/source/SoundTouch/Makefile new file mode 100644 index 0000000..87737b2 --- /dev/null +++ b/pysoundtouch/soundtouch/source/SoundTouch/Makefile @@ -0,0 +1,683 @@ +# Makefile.in generated by automake 1.15 from Makefile.am. +# source/SoundTouch/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994-2014 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + + + +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/soundtouch +pkgincludedir = $(includedir)/soundtouch +pkglibdir = $(libdir)/soundtouch +pkglibexecdir = $(libexecdir)/soundtouch +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-unknown-linux-gnu +host_triplet = x86_64-unknown-linux-gnu +subdir = source/SoundTouch +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/m4/libtool.m4 \ + $(top_srcdir)/config/m4/ltoptions.m4 \ + $(top_srcdir)/config/m4/ltsugar.m4 \ + $(top_srcdir)/config/m4/ltversion.m4 \ + $(top_srcdir)/config/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/soundtouch_config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(libdir)" +LTLIBRARIES = $(lib_LTLIBRARIES) +libSoundTouch_la_LIBADD = +am_libSoundTouch_la_OBJECTS = AAFilter.lo FIRFilter.lo \ + FIFOSampleBuffer.lo mmx_optimized.lo sse_optimized.lo \ + RateTransposer.lo SoundTouch.lo TDStretch.lo \ + cpu_detect_x86_gcc.lo BPMDetect.lo PeakFinder.lo +libSoundTouch_la_OBJECTS = $(am_libSoundTouch_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +am__v_lt_1 = +AM_V_P = $(am__v_P_$(V)) +am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I. -I$(top_builddir)/include +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_$(V)) +am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY)) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_$(V)) +am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = +SOURCES = $(libSoundTouch_la_SOURCES) +DIST_SOURCES = $(libSoundTouch_la_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +HEADERS = $(noinst_HEADERS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in \ + $(top_srcdir)/config/am_include.mk \ + $(top_srcdir)/config/depcomp +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = ${SHELL} /home/pepper/soundtouch/pysoundtouch/soundtouch/config/missing aclocal-1.15 +AMTAR = $${TAR-tar} +AM_DEFAULT_VERBOSITY = 1 +AR = ar +AUTOCONF = ${SHELL} /home/pepper/soundtouch/pysoundtouch/soundtouch/config/missing autoconf +AUTOHEADER = ${SHELL} /home/pepper/soundtouch/pysoundtouch/soundtouch/config/missing autoheader +AUTOMAKE = ${SHELL} /home/pepper/soundtouch/pysoundtouch/soundtouch/config/missing automake-1.15 +AWK = gawk +CC = gcc +CCDEPMODE = depmode=gcc3 +CFLAGS = -g -O2 +CPP = gcc -E +CPPFLAGS = +CXX = g++ +CXXCPP = g++ -E +CXXDEPMODE = depmode=gcc3 +CXXFLAGS = -fPIC +CYGPATH_W = echo +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +DLLTOOL = false +DSYMUTIL = +DUMPBIN = +ECHO_C = +ECHO_N = -n +ECHO_T = +EGREP = /usr/bin/grep -E +EXEEXT = +FGREP = /usr/bin/grep -F +GREP = /usr/bin/grep +INSTALL = /usr/bin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +LD = /usr/bin/ld -m elf_x86_64 +LDFLAGS = +LIBOBJS = +LIBS = -lm +LIBTOOL = $(SHELL) $(top_builddir)/libtool +LIPO = +LN_S = ln -s +LTLIBOBJS = +LT_SYS_LIBRARY_PATH = +MAKEINFO = ${SHELL} /home/pepper/soundtouch/pysoundtouch/soundtouch/config/missing makeinfo +MANIFEST_TOOL = : +MKDIR_P = /usr/bin/mkdir -p +NM = /usr/bin/nm -B +NMEDIT = +OBJDUMP = objdump +OBJEXT = o +OTOOL = +OTOOL64 = +PACKAGE = soundtouch +PACKAGE_BUGREPORT = http://www.surina.net/soundtouch +PACKAGE_NAME = SoundTouch +PACKAGE_STRING = SoundTouch 1.4.0 +PACKAGE_TARNAME = soundtouch +PACKAGE_URL = +PACKAGE_VERSION = 1.4.0 +PATH_SEPARATOR = : +RANLIB = ranlib +SED = /usr/bin/sed +SET_MAKE = +SHELL = /bin/sh +STRIP = strip +VERSION = 1.4.0 +abs_builddir = /home/pepper/soundtouch/pysoundtouch/soundtouch/source/SoundTouch +abs_srcdir = /home/pepper/soundtouch/pysoundtouch/soundtouch/source/SoundTouch +abs_top_builddir = /home/pepper/soundtouch/pysoundtouch/soundtouch +abs_top_srcdir = /home/pepper/soundtouch/pysoundtouch/soundtouch +ac_ct_AR = ar +ac_ct_CC = gcc +ac_ct_CXX = g++ +ac_ct_DUMPBIN = +am__include = include +am__leading_dot = . +am__quote = +am__tar = $${TAR-tar} chof - "$$tardir" +am__untar = $${TAR-tar} xf - +bindir = ${exec_prefix}/bin +build = x86_64-unknown-linux-gnu +build_alias = +build_cpu = x86_64 +build_os = linux-gnu +build_vendor = unknown +builddir = . +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +exec_prefix = ${prefix} +host = x86_64-unknown-linux-gnu +host_alias = +host_cpu = x86_64 +host_os = linux-gnu +host_vendor = unknown +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = ${SHELL} /home/pepper/soundtouch/pysoundtouch/soundtouch/config/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = $(MKDIR_P) +oldincludedir = /usr/include +pdfdir = ${docdir} +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +srcdir = . +sysconfdir = ${prefix}/etc +target_alias = +top_build_prefix = ../../ +top_builddir = ../.. +top_srcdir = ../.. +INCLUDES = -I$(top_srcdir)/include + +# doc directory +pkgdocdir = $(prefix)/doc/soundtouch + +# set to something if you want other stuff to be included in the distribution tarball +EXTRA_DIST = 3dnow_win.cpp cpu_detect_x86_win.cpp SoundTouch.dsp SoundTouch.dsw SoundTouch.sln SoundTouch.vcproj +noinst_HEADERS = AAFilter.h cpu_detect.h cpu_detect_x86_gcc.cpp FIRFilter.h RateTransposer.h TDStretch.h PeakFinder.h +lib_LTLIBRARIES = libSoundTouch.la +# +libSoundTouch_la_SOURCES = AAFilter.cpp FIRFilter.cpp FIFOSampleBuffer.cpp mmx_optimized.cpp sse_optimized.cpp RateTransposer.cpp SoundTouch.cpp TDStretch.cpp cpu_detect_x86_gcc.cpp BPMDetect.cpp PeakFinder.cpp + +# Note by authore: '-msse2' might not work in non-X86 compilations. If someone can +# fix this script to automatically check for CPU architecture, please submit a patch +# to me. +AM_CXXFLAGS = -O3 -msse2 -fcheck-new -I../../include +all: all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/config/am_include.mk $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign source/SoundTouch/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign source/SoundTouch/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_srcdir)/config/am_include.mk $(am__empty): + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ + } + +uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ + done + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + @list='$(lib_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } + +libSoundTouch.la: $(libSoundTouch_la_OBJECTS) $(libSoundTouch_la_DEPENDENCIES) $(EXTRA_libSoundTouch_la_DEPENDENCIES) + $(AM_V_CXXLD)$(CXXLINK) -rpath $(libdir) $(libSoundTouch_la_OBJECTS) $(libSoundTouch_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +include ./$(DEPDIR)/AAFilter.Plo +include ./$(DEPDIR)/BPMDetect.Plo +include ./$(DEPDIR)/FIFOSampleBuffer.Plo +include ./$(DEPDIR)/FIRFilter.Plo +include ./$(DEPDIR)/PeakFinder.Plo +include ./$(DEPDIR)/RateTransposer.Plo +include ./$(DEPDIR)/SoundTouch.Plo +include ./$(DEPDIR)/TDStretch.Plo +include ./$(DEPDIR)/cpu_detect_x86_gcc.Plo +include ./$(DEPDIR)/mmx_optimized.Plo +include ./$(DEPDIR)/sse_optimized.Plo + +.cpp.o: + $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< + $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# $(AM_V_CXX)source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \ +# $(AM_V_CXX_no)$(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: + $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` + $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# $(AM_V_CXX)source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \ +# $(AM_V_CXX_no)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: + $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< + $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +# $(AM_V_CXX)source='$<' object='$@' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \ +# $(AM_V_CXX_no)$(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(libdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-libLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-libLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libLTLIBRARIES clean-libtool cscopelist-am ctags \ + ctags-am 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-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-libLTLIBRARIES install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am uninstall-libLTLIBRARIES + +.PRECIOUS: Makefile + + +# other linking flags to add +# noinst_LTLIBRARIES = libSoundTouchOpt.la +# libSoundTouch_la_LIBADD = libSoundTouchOpt.la +# libSoundTouchOpt_la_SOURCES = mmx_optimized.cpp sse_optimized.cpp +# libSoundTouchOpt_la_CXXFLAGS = -O3 -msse2 -fcheck-new -I../../include + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/pysoundtouch/soundtouch/source/SoundTouch/Makefile.am b/pysoundtouch/soundtouch/source/SoundTouch/Makefile.am new file mode 100644 index 0000000..9c05a77 --- /dev/null +++ b/pysoundtouch/soundtouch/source/SoundTouch/Makefile.am @@ -0,0 +1,46 @@ +## Process this file with automake to create Makefile.in +## +## $Id: Makefile.am 37 2008-12-25 16:33:39Z oparviai $ +## +## Copyright (C) 2003 - David W. Durham +## +## This file is part of SoundTouch, an audio processing library for pitch/time adjustments +## +## SoundTouch is free software; you can redistribute it and/or modify it under the +## terms of the GNU General Public License as published by the Free Software +## Foundation; either version 2 of the License, or (at your option) any later +## version. +## +## SoundTouch is distributed in the hope that it will be useful, but WITHOUT ANY +## WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +## A PARTICULAR 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 $(top_srcdir)/config/am_include.mk + + +# set to something if you want other stuff to be included in the distribution tarball +EXTRA_DIST=3dnow_win.cpp cpu_detect_x86_win.cpp SoundTouch.dsp SoundTouch.dsw SoundTouch.sln SoundTouch.vcproj + +noinst_HEADERS=AAFilter.h cpu_detect.h cpu_detect_x86_gcc.cpp FIRFilter.h RateTransposer.h TDStretch.h PeakFinder.h + +lib_LTLIBRARIES=libSoundTouch.la +# +libSoundTouch_la_SOURCES=AAFilter.cpp FIRFilter.cpp FIFOSampleBuffer.cpp mmx_optimized.cpp sse_optimized.cpp RateTransposer.cpp SoundTouch.cpp TDStretch.cpp cpu_detect_x86_gcc.cpp BPMDetect.cpp PeakFinder.cpp + + +# Note by authore: '-msse2' might not work in non-X86 compilations. If someone can +# fix this script to automatically check for CPU architecture, please submit a patch +# to me. +AM_CXXFLAGS=-O3 -msse2 -fcheck-new -I../../include + + +# other linking flags to add +# noinst_LTLIBRARIES = libSoundTouchOpt.la +# libSoundTouch_la_LIBADD = libSoundTouchOpt.la +# libSoundTouchOpt_la_SOURCES = mmx_optimized.cpp sse_optimized.cpp +# libSoundTouchOpt_la_CXXFLAGS = -O3 -msse2 -fcheck-new -I../../include diff --git a/pysoundtouch/soundtouch/source/SoundTouch/Makefile.in b/pysoundtouch/soundtouch/source/SoundTouch/Makefile.in new file mode 100644 index 0000000..629c7fb --- /dev/null +++ b/pysoundtouch/soundtouch/source/SoundTouch/Makefile.in @@ -0,0 +1,683 @@ +# Makefile.in generated by automake 1.15 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2014 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = source/SoundTouch +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/m4/libtool.m4 \ + $(top_srcdir)/config/m4/ltoptions.m4 \ + $(top_srcdir)/config/m4/ltsugar.m4 \ + $(top_srcdir)/config/m4/ltversion.m4 \ + $(top_srcdir)/config/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/soundtouch_config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(libdir)" +LTLIBRARIES = $(lib_LTLIBRARIES) +libSoundTouch_la_LIBADD = +am_libSoundTouch_la_OBJECTS = AAFilter.lo FIRFilter.lo \ + FIFOSampleBuffer.lo mmx_optimized.lo sse_optimized.lo \ + RateTransposer.lo SoundTouch.lo TDStretch.lo \ + cpu_detect_x86_gcc.lo BPMDetect.lo PeakFinder.lo +libSoundTouch_la_OBJECTS = $(am_libSoundTouch_la_OBJECTS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = +SOURCES = $(libSoundTouch_la_SOURCES) +DIST_SOURCES = $(libSoundTouch_la_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +HEADERS = $(noinst_HEADERS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in \ + $(top_srcdir)/config/am_include.mk \ + $(top_srcdir)/config/depcomp +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +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@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +INCLUDES = -I$(top_srcdir)/include + +# doc directory +pkgdocdir = $(prefix)/doc/@PACKAGE@ + +# set to something if you want other stuff to be included in the distribution tarball +EXTRA_DIST = 3dnow_win.cpp cpu_detect_x86_win.cpp SoundTouch.dsp SoundTouch.dsw SoundTouch.sln SoundTouch.vcproj +noinst_HEADERS = AAFilter.h cpu_detect.h cpu_detect_x86_gcc.cpp FIRFilter.h RateTransposer.h TDStretch.h PeakFinder.h +lib_LTLIBRARIES = libSoundTouch.la +# +libSoundTouch_la_SOURCES = AAFilter.cpp FIRFilter.cpp FIFOSampleBuffer.cpp mmx_optimized.cpp sse_optimized.cpp RateTransposer.cpp SoundTouch.cpp TDStretch.cpp cpu_detect_x86_gcc.cpp BPMDetect.cpp PeakFinder.cpp + +# Note by authore: '-msse2' might not work in non-X86 compilations. If someone can +# fix this script to automatically check for CPU architecture, please submit a patch +# to me. +AM_CXXFLAGS = -O3 -msse2 -fcheck-new -I../../include +all: all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/config/am_include.mk $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign source/SoundTouch/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign source/SoundTouch/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_srcdir)/config/am_include.mk $(am__empty): + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ + } + +uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ + done + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + @list='$(lib_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } + +libSoundTouch.la: $(libSoundTouch_la_OBJECTS) $(libSoundTouch_la_DEPENDENCIES) $(EXTRA_libSoundTouch_la_DEPENDENCIES) + $(AM_V_CXXLD)$(CXXLINK) -rpath $(libdir) $(libSoundTouch_la_OBJECTS) $(libSoundTouch_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AAFilter.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BPMDetect.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FIFOSampleBuffer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FIRFilter.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PeakFinder.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RateTransposer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SoundTouch.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TDStretch.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu_detect_x86_gcc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mmx_optimized.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sse_optimized.Plo@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(libdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-libLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-libLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libLTLIBRARIES clean-libtool cscopelist-am ctags \ + ctags-am 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-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-libLTLIBRARIES install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am uninstall-libLTLIBRARIES + +.PRECIOUS: Makefile + + +# other linking flags to add +# noinst_LTLIBRARIES = libSoundTouchOpt.la +# libSoundTouch_la_LIBADD = libSoundTouchOpt.la +# libSoundTouchOpt_la_SOURCES = mmx_optimized.cpp sse_optimized.cpp +# libSoundTouchOpt_la_CXXFLAGS = -O3 -msse2 -fcheck-new -I../../include + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/pysoundtouch/soundtouch/source/SoundTouch/PeakFinder.cpp b/pysoundtouch/soundtouch/source/SoundTouch/PeakFinder.cpp new file mode 100644 index 0000000..3b08ad3 --- /dev/null +++ b/pysoundtouch/soundtouch/source/SoundTouch/PeakFinder.cpp @@ -0,0 +1,242 @@ +//////////////////////////////////////////////////////////////////////////////// +/// +/// Peak detection routine. +/// +/// The routine detects highest value on an array of values and calculates the +/// precise peak location as a mass-center of the 'hump' around the peak value. +/// +/// Author : Copyright (c) Olli Parviainen +/// Author e-mail : oparviai 'at' iki.fi +/// SoundTouch WWW: http://www.surina.net/soundtouch +/// +//////////////////////////////////////////////////////////////////////////////// +// +// Last changed : $Date: 2009-02-21 18:00:14 +0200 (Sat, 21 Feb 2009) $ +// File revision : $Revision: 4 $ +// +// $Id: PeakFinder.cpp 63 2009-02-21 16:00:14Z oparviai $ +// +//////////////////////////////////////////////////////////////////////////////// +// +// License : +// +// SoundTouch audio processing library +// Copyright (c) Olli Parviainen +// +// 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 library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +//////////////////////////////////////////////////////////////////////////////// + +#include +#include +#include + +#include "PeakFinder.h" + +using namespace soundtouch; + +#define max(x, y) (((x) > (y)) ? (x) : (y)) + + +PeakFinder::PeakFinder() +{ + minPos = maxPos = 0; +} + + +// Finds 'ground level' of a peak hump by starting from 'peakpos' and proceeding +// to direction defined by 'direction' until next 'hump' after minimum value will +// begin +int PeakFinder::findGround(const float *data, int peakpos, int direction) const +{ + float refvalue; + int lowpos; + int pos; + int climb_count; + float delta; + + climb_count = 0; + refvalue = data[peakpos]; + lowpos = peakpos; + + pos = peakpos; + + while ((pos > minPos) && (pos < maxPos)) + { + int prevpos; + + prevpos = pos; + pos += direction; + + // calculate derivate + delta = data[pos] - data[prevpos]; + if (delta <= 0) + { + // going downhill, ok + if (climb_count) + { + climb_count --; // decrease climb count + } + + // check if new minimum found + if (data[pos] < refvalue) + { + // new minimum found + lowpos = pos; + refvalue = data[pos]; + } + } + else + { + // going uphill, increase climbing counter + climb_count ++; + if (climb_count > 5) break; // we've been climbing too long => it's next uphill => quit + } + } + return lowpos; +} + + +// Find offset where the value crosses the given level, when starting from 'peakpos' and +// proceeds to direction defined in 'direction' +int PeakFinder::findCrossingLevel(const float *data, float level, int peakpos, int direction) const +{ + float peaklevel; + int pos; + + peaklevel = data[peakpos]; + assert(peaklevel >= level); + pos = peakpos; + while ((pos >= minPos) && (pos < maxPos)) + { + if (data[pos + direction] < level) return pos; // crossing found + pos += direction; + } + return -1; // not found +} + + +// Calculates the center of mass location of 'data' array items between 'firstPos' and 'lastPos' +double PeakFinder::calcMassCenter(const float *data, int firstPos, int lastPos) const +{ + int i; + float sum; + float wsum; + + sum = 0; + wsum = 0; + for (i = firstPos; i <= lastPos; i ++) + { + sum += (float)i * data[i]; + wsum += data[i]; + } + + if (wsum < 1e-6) return 0; + return sum / wsum; +} + + + +/// get exact center of peak near given position by calculating local mass of center +double PeakFinder::getPeakCenter(const float *data, int peakpos, bool loose) const +{ + float peakLevel; // peak level + int crosspos1, crosspos2; // position where the peak 'hump' crosses cutting level + float cutLevel; // cutting value + float groundLevel; // ground level of the peak + int gp1, gp2; // bottom positions of the peak 'hump' + + // find ground positions. + gp1 = findGround(data, peakpos, -1); + gp2 = findGround(data, peakpos, 1); + + groundLevel = max(data[gp1], data[gp2]); + peakLevel = data[peakpos]; + + if (!loose) { + if (groundLevel < 1e-6) return 0; // ground level too small => detection failed + if ((peakLevel / groundLevel) < 1.3) return 0; // peak less than 30% of the ground level => no good peak detected + } + + // calculate 70%-level of the peak + cutLevel = 0.70f * peakLevel + 0.30f * groundLevel; + // find mid-level crossings + crosspos1 = findCrossingLevel(data, cutLevel, peakpos, -1); + crosspos2 = findCrossingLevel(data, cutLevel, peakpos, 1); + + if ((crosspos1 < 0) || (crosspos2 < 0)) return 0; // no crossing, no peak.. + + // calculate mass center of the peak surroundings + return calcMassCenter(data, crosspos1, crosspos2); +} + + + +double PeakFinder::detectPeak(const float *data, int aminPos, int amaxPos, bool loose) +{ + + int i; + int peakpos; // position of peak level + double highPeak, peak; + + this->minPos = aminPos; + this->maxPos = amaxPos; + + // find absolute peak + peakpos = minPos; + peak = data[minPos]; + for (i = minPos + 1; i < maxPos; i ++) + { + if (data[i] > peak) + { + peak = data[i]; + peakpos = i; + } + } + + // Calculate exact location of the highest peak mass center + highPeak = getPeakCenter(data, peakpos); + peak = highPeak; + + // Now check if the highest peak were in fact harmonic of the true base beat peak + // - sometimes the highest peak can be Nth harmonic of the true base peak yet + // just a slightly higher than the true base + for (i = 2; i < 10; i ++) + { + double peaktmp, tmp; + int i1,i2; + + peakpos = (int)(highPeak / (double)i + 0.5f); + if (peakpos < minPos) break; + + // calculate mass-center of possible base peak + peaktmp = getPeakCenter(data, peakpos); + + // now compare to highest detected peak + i1 = (int)(highPeak + 0.5); + i2 = (int)(peaktmp + 0.5); + tmp = 2 * (data[i2] - data[i1]) / (data[i2] + data[i1]); + if (fabs(tmp) < 0.1) + { + // The highest peak is harmonic of almost as high base peak, + // thus use the base peak instead + peak = peaktmp; + } + } + + return peak; +} + + diff --git a/pysoundtouch/soundtouch/source/SoundTouch/PeakFinder.h b/pysoundtouch/soundtouch/source/SoundTouch/PeakFinder.h new file mode 100644 index 0000000..4b6f163 --- /dev/null +++ b/pysoundtouch/soundtouch/source/SoundTouch/PeakFinder.h @@ -0,0 +1,94 @@ +//////////////////////////////////////////////////////////////////////////////// +/// +/// The routine detects highest value on an array of values and calculates the +/// precise peak location as a mass-center of the 'hump' around the peak value. +/// +/// Author : Copyright (c) Olli Parviainen +/// Author e-mail : oparviai 'at' iki.fi +/// SoundTouch WWW: http://www.surina.net/soundtouch +/// +//////////////////////////////////////////////////////////////////////////////// +// +// Last changed : $Date: 2009-02-21 18:00:14 +0200 (Sat, 21 Feb 2009) $ +// File revision : $Revision: 4 $ +// +// $Id: PeakFinder.h 63 2009-02-21 16:00:14Z oparviai $ +// +//////////////////////////////////////////////////////////////////////////////// +// +// License : +// +// SoundTouch audio processing library +// Copyright (c) Olli Parviainen +// +// 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 library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +//////////////////////////////////////////////////////////////////////////////// + +#ifndef _PeakFinder_H_ +#define _PeakFinder_H_ + +namespace soundtouch +{ + +class PeakFinder +{ +protected: + /// Min, max allowed peak positions within the data vector + int minPos, maxPos; + + /// Calculates the mass center between given vector items. + double calcMassCenter(const float *data, ///< Data vector. + int firstPos, ///< Index of first vector item beloging to the peak. + int lastPos ///< Index of last vector item beloging to the peak. + ) const; + + /// Finds the data vector index where the monotoniously decreasing signal crosses the + /// given level. + int findCrossingLevel(const float *data, ///< Data vector. + float level, ///< Goal crossing level. + int peakpos, ///< Peak position index within the data vector. + int direction /// Direction where to proceed from the peak: 1 = right, -1 = left. + ) const; + + /// Finds the 'ground' level, i.e. smallest level between two neighbouring peaks, to right- + /// or left-hand side of the given peak position. + int findGround(const float *data, /// Data vector. + int peakpos, /// Peak position index within the data vector. + int direction /// Direction where to proceed from the peak: 1 = right, -1 = left. + ) const; + + /// get exact center of peak near given position by calculating local mass of center + double getPeakCenter(const float *data, int peakpos, bool loose = 0) const; + +public: + /// Constructor. + PeakFinder(); + + /// Detect exact peak position of the data vector by finding the largest peak 'hump' + /// and calculating the mass-center location of the peak hump. + /// + /// \return The location of the largest base harmonic peak hump. + double detectPeak(const float *data, /// Data vector to be analyzed. The data vector has + /// to be at least 'maxPos' items long. + int minPos, ///< Min allowed peak location within the vector data. + int maxPos, ///< Max allowed peak location within the vector data. + bool loose = 0 + ); +}; + +} + +#endif // _PeakFinder_H_ diff --git a/pysoundtouch/soundtouch/source/SoundTouch/RateTransposer.cpp b/pysoundtouch/soundtouch/source/SoundTouch/RateTransposer.cpp new file mode 100644 index 0000000..7e0b277 --- /dev/null +++ b/pysoundtouch/soundtouch/source/SoundTouch/RateTransposer.cpp @@ -0,0 +1,628 @@ +//////////////////////////////////////////////////////////////////////////////// +/// +/// Sample rate transposer. Changes sample rate by using linear interpolation +/// together with anti-alias filtering (first order interpolation with anti- +/// alias filtering should be quite adequate for this application) +/// +/// Author : Copyright (c) Olli Parviainen +/// Author e-mail : oparviai 'at' iki.fi +/// SoundTouch WWW: http://www.surina.net/soundtouch +/// +//////////////////////////////////////////////////////////////////////////////// +// +// Last changed : $Date: 2009-10-31 16:37:24 +0200 (Sat, 31 Oct 2009) $ +// File revision : $Revision: 4 $ +// +// $Id: RateTransposer.cpp 74 2009-10-31 14:37:24Z oparviai $ +// +//////////////////////////////////////////////////////////////////////////////// +// +// License : +// +// SoundTouch audio processing library +// Copyright (c) Olli Parviainen +// +// 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 library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +//////////////////////////////////////////////////////////////////////////////// + +#include +#include +#include +#include +#include +#include "RateTransposer.h" +#include "AAFilter.h" + +using namespace std; +using namespace soundtouch; + + +/// A linear samplerate transposer class that uses integer arithmetics. +/// for the transposing. +class RateTransposerInteger : public RateTransposer +{ +protected: + int iSlopeCount; + int iRate; + SAMPLETYPE sPrevSampleL, sPrevSampleR; + + virtual void resetRegisters(); + + virtual uint transposeStereo(SAMPLETYPE *dest, + const SAMPLETYPE *src, + uint numSamples); + virtual uint transposeMono(SAMPLETYPE *dest, + const SAMPLETYPE *src, + uint numSamples); + +public: + RateTransposerInteger(); + virtual ~RateTransposerInteger(); + + /// Sets new target rate. Normal rate = 1.0, smaller values represent slower + /// rate, larger faster rates. + virtual void setRate(float newRate); + +}; + + +/// A linear samplerate transposer class that uses floating point arithmetics +/// for the transposing. +class RateTransposerFloat : public RateTransposer +{ +protected: + float fSlopeCount; + SAMPLETYPE sPrevSampleL, sPrevSampleR; + + virtual void resetRegisters(); + + virtual uint transposeStereo(SAMPLETYPE *dest, + const SAMPLETYPE *src, + uint numSamples); + virtual uint transposeMono(SAMPLETYPE *dest, + const SAMPLETYPE *src, + uint numSamples); + +public: + RateTransposerFloat(); + virtual ~RateTransposerFloat(); +}; + + + + +// Operator 'new' is overloaded so that it automatically creates a suitable instance +// depending on if we've a MMX/SSE/etc-capable CPU available or not. +void * RateTransposer::operator new(size_t s) +{ + throw runtime_error("Error in RateTransoser::new: don't use \"new TDStretch\" directly, use \"newInstance\" to create a new instance instead!"); + return NULL; +} + + +RateTransposer *RateTransposer::newInstance() +{ +#ifdef INTEGER_SAMPLES + return ::new RateTransposerInteger; +#else + return ::new RateTransposerFloat; +#endif +} + + +// Constructor +RateTransposer::RateTransposer() : FIFOProcessor(&outputBuffer) +{ + numChannels = 2; + bUseAAFilter = TRUE; + fRate = 0; + + // Instantiates the anti-alias filter with default tap length + // of 32 + pAAFilter = new AAFilter(32); +} + + + +RateTransposer::~RateTransposer() +{ + delete pAAFilter; +} + + + +/// Enables/disables the anti-alias filter. Zero to disable, nonzero to enable +void RateTransposer::enableAAFilter(BOOL newMode) +{ + bUseAAFilter = newMode; +} + + +/// Returns nonzero if anti-alias filter is enabled. +BOOL RateTransposer::isAAFilterEnabled() const +{ + return bUseAAFilter; +} + + +AAFilter *RateTransposer::getAAFilter() +{ + return pAAFilter; +} + + + +// Sets new target iRate. Normal iRate = 1.0, smaller values represent slower +// iRate, larger faster iRates. +void RateTransposer::setRate(float newRate) +{ + double fCutoff; + + fRate = newRate; + + // design a new anti-alias filter + if (newRate > 1.0f) + { + fCutoff = 0.5f / newRate; + } + else + { + fCutoff = 0.5f * newRate; + } + pAAFilter->setCutoffFreq(fCutoff); +} + + +// Outputs as many samples of the 'outputBuffer' as possible, and if there's +// any room left, outputs also as many of the incoming samples as possible. +// The goal is to drive the outputBuffer empty. +// +// It's allowed for 'output' and 'input' parameters to point to the same +// memory position. +/* +void RateTransposer::flushStoreBuffer() +{ + if (storeBuffer.isEmpty()) return; + + outputBuffer.moveSamples(storeBuffer); +} +*/ + + +// Adds 'nSamples' pcs of samples from the 'samples' memory position into +// the input of the object. +void RateTransposer::putSamples(const SAMPLETYPE *samples, uint nSamples) +{ + processSamples(samples, nSamples); +} + + + +// Transposes up the sample rate, causing the observed playback 'rate' of the +// sound to decrease +void RateTransposer::upsample(const SAMPLETYPE *src, uint nSamples) +{ + uint count, sizeTemp, num; + + // If the parameter 'uRate' value is smaller than 'SCALE', first transpose + // the samples and then apply the anti-alias filter to remove aliasing. + + // First check that there's enough room in 'storeBuffer' + // (+16 is to reserve some slack in the destination buffer) + sizeTemp = (uint)((float)nSamples / fRate + 16.0f); + + // Transpose the samples, store the result into the end of "storeBuffer" + count = transpose(storeBuffer.ptrEnd(sizeTemp), src, nSamples); + storeBuffer.putSamples(count); + + // Apply the anti-alias filter to samples in "store output", output the + // result to "dest" + num = storeBuffer.numSamples(); + count = pAAFilter->evaluate(outputBuffer.ptrEnd(num), + storeBuffer.ptrBegin(), num, (uint)numChannels); + outputBuffer.putSamples(count); + + // Remove the processed samples from "storeBuffer" + storeBuffer.receiveSamples(count); +} + + +// Transposes down the sample rate, causing the observed playback 'rate' of the +// sound to increase +void RateTransposer::downsample(const SAMPLETYPE *src, uint nSamples) +{ + uint count, sizeTemp; + + // If the parameter 'uRate' value is larger than 'SCALE', first apply the + // anti-alias filter to remove high frequencies (prevent them from folding + // over the lover frequencies), then transpose. + + // Add the new samples to the end of the storeBuffer + storeBuffer.putSamples(src, nSamples); + + // Anti-alias filter the samples to prevent folding and output the filtered + // data to tempBuffer. Note : because of the FIR filter length, the + // filtering routine takes in 'filter_length' more samples than it outputs. + assert(tempBuffer.isEmpty()); + sizeTemp = storeBuffer.numSamples(); + + count = pAAFilter->evaluate(tempBuffer.ptrEnd(sizeTemp), + storeBuffer.ptrBegin(), sizeTemp, (uint)numChannels); + + if (count == 0) return; + + // Remove the filtered samples from 'storeBuffer' + storeBuffer.receiveSamples(count); + + // Transpose the samples (+16 is to reserve some slack in the destination buffer) + sizeTemp = (uint)((float)nSamples / fRate + 16.0f); + count = transpose(outputBuffer.ptrEnd(sizeTemp), tempBuffer.ptrBegin(), count); + outputBuffer.putSamples(count); +} + + +// Transposes sample rate by applying anti-alias filter to prevent folding. +// Returns amount of samples returned in the "dest" buffer. +// The maximum amount of samples that can be returned at a time is set by +// the 'set_returnBuffer_size' function. +void RateTransposer::processSamples(const SAMPLETYPE *src, uint nSamples) +{ + uint count; + uint sizeReq; + + if (nSamples == 0) return; + assert(pAAFilter); + + // If anti-alias filter is turned off, simply transpose without applying + // the filter + if (bUseAAFilter == FALSE) + { + sizeReq = (uint)((float)nSamples / fRate + 1.0f); + count = transpose(outputBuffer.ptrEnd(sizeReq), src, nSamples); + outputBuffer.putSamples(count); + return; + } + + // Transpose with anti-alias filter + if (fRate < 1.0f) + { + upsample(src, nSamples); + } + else + { + downsample(src, nSamples); + } +} + + +// Transposes the sample rate of the given samples using linear interpolation. +// Returns the number of samples returned in the "dest" buffer +inline uint RateTransposer::transpose(SAMPLETYPE *dest, const SAMPLETYPE *src, uint nSamples) +{ + if (numChannels == 2) + { + return transposeStereo(dest, src, nSamples); + } + else + { + return transposeMono(dest, src, nSamples); + } +} + + +// Sets the number of channels, 1 = mono, 2 = stereo +void RateTransposer::setChannels(int nChannels) +{ + assert(nChannels > 0); + if (numChannels == nChannels) return; + + assert(nChannels == 1 || nChannels == 2); + numChannels = nChannels; + + storeBuffer.setChannels(numChannels); + tempBuffer.setChannels(numChannels); + outputBuffer.setChannels(numChannels); + + // Inits the linear interpolation registers + resetRegisters(); +} + + +// Clears all the samples in the object +void RateTransposer::clear() +{ + outputBuffer.clear(); + storeBuffer.clear(); +} + + +// Returns nonzero if there aren't any samples available for outputting. +int RateTransposer::isEmpty() const +{ + int res; + + res = FIFOProcessor::isEmpty(); + if (res == 0) return 0; + return storeBuffer.isEmpty(); +} + + +////////////////////////////////////////////////////////////////////////////// +// +// RateTransposerInteger - integer arithmetic implementation +// + +/// fixed-point interpolation routine precision +#define SCALE 65536 + +// Constructor +RateTransposerInteger::RateTransposerInteger() : RateTransposer() +{ + // Notice: use local function calling syntax for sake of clarity, + // to indicate the fact that C++ constructor can't call virtual functions. + RateTransposerInteger::resetRegisters(); + RateTransposerInteger::setRate(1.0f); +} + + +RateTransposerInteger::~RateTransposerInteger() +{ +} + + +void RateTransposerInteger::resetRegisters() +{ + iSlopeCount = 0; + sPrevSampleL = + sPrevSampleR = 0; +} + + + +// Transposes the sample rate of the given samples using linear interpolation. +// 'Mono' version of the routine. Returns the number of samples returned in +// the "dest" buffer +uint RateTransposerInteger::transposeMono(SAMPLETYPE *dest, const SAMPLETYPE *src, uint nSamples) +{ + unsigned int i, used; + LONG_SAMPLETYPE temp, vol1; + + if (nSamples == 0) return 0; // no samples, no work + + used = 0; + i = 0; + + // Process the last sample saved from the previous call first... + while (iSlopeCount <= SCALE) + { + vol1 = (LONG_SAMPLETYPE)(SCALE - iSlopeCount); + temp = vol1 * sPrevSampleL + iSlopeCount * src[0]; + dest[i] = (SAMPLETYPE)(temp / SCALE); + i++; + iSlopeCount += iRate; + } + // now always (iSlopeCount > SCALE) + iSlopeCount -= SCALE; + + while (1) + { + while (iSlopeCount > SCALE) + { + iSlopeCount -= SCALE; + used ++; + if (used >= nSamples - 1) goto end; + } + vol1 = (LONG_SAMPLETYPE)(SCALE - iSlopeCount); + temp = src[used] * vol1 + iSlopeCount * src[used + 1]; + dest[i] = (SAMPLETYPE)(temp / SCALE); + + i++; + iSlopeCount += iRate; + } +end: + // Store the last sample for the next round + sPrevSampleL = src[nSamples - 1]; + + return i; +} + + +// Transposes the sample rate of the given samples using linear interpolation. +// 'Stereo' version of the routine. Returns the number of samples returned in +// the "dest" buffer +uint RateTransposerInteger::transposeStereo(SAMPLETYPE *dest, const SAMPLETYPE *src, uint nSamples) +{ + unsigned int srcPos, i, used; + LONG_SAMPLETYPE temp, vol1; + + if (nSamples == 0) return 0; // no samples, no work + + used = 0; + i = 0; + + // Process the last sample saved from the sPrevSampleLious call first... + while (iSlopeCount <= SCALE) + { + vol1 = (LONG_SAMPLETYPE)(SCALE - iSlopeCount); + temp = vol1 * sPrevSampleL + iSlopeCount * src[0]; + dest[2 * i] = (SAMPLETYPE)(temp / SCALE); + temp = vol1 * sPrevSampleR + iSlopeCount * src[1]; + dest[2 * i + 1] = (SAMPLETYPE)(temp / SCALE); + i++; + iSlopeCount += iRate; + } + // now always (iSlopeCount > SCALE) + iSlopeCount -= SCALE; + + while (1) + { + while (iSlopeCount > SCALE) + { + iSlopeCount -= SCALE; + used ++; + if (used >= nSamples - 1) goto end; + } + srcPos = 2 * used; + vol1 = (LONG_SAMPLETYPE)(SCALE - iSlopeCount); + temp = src[srcPos] * vol1 + iSlopeCount * src[srcPos + 2]; + dest[2 * i] = (SAMPLETYPE)(temp / SCALE); + temp = src[srcPos + 1] * vol1 + iSlopeCount * src[srcPos + 3]; + dest[2 * i + 1] = (SAMPLETYPE)(temp / SCALE); + + i++; + iSlopeCount += iRate; + } +end: + // Store the last sample for the next round + sPrevSampleL = src[2 * nSamples - 2]; + sPrevSampleR = src[2 * nSamples - 1]; + + return i; +} + + +// Sets new target iRate. Normal iRate = 1.0, smaller values represent slower +// iRate, larger faster iRates. +void RateTransposerInteger::setRate(float newRate) +{ + iRate = (int)(newRate * SCALE + 0.5f); + RateTransposer::setRate(newRate); +} + + +////////////////////////////////////////////////////////////////////////////// +// +// RateTransposerFloat - floating point arithmetic implementation +// +////////////////////////////////////////////////////////////////////////////// + +// Constructor +RateTransposerFloat::RateTransposerFloat() : RateTransposer() +{ + // Notice: use local function calling syntax for sake of clarity, + // to indicate the fact that C++ constructor can't call virtual functions. + RateTransposerFloat::resetRegisters(); + RateTransposerFloat::setRate(1.0f); +} + + +RateTransposerFloat::~RateTransposerFloat() +{ +} + + +void RateTransposerFloat::resetRegisters() +{ + fSlopeCount = 0; + sPrevSampleL = + sPrevSampleR = 0; +} + + + +// Transposes the sample rate of the given samples using linear interpolation. +// 'Mono' version of the routine. Returns the number of samples returned in +// the "dest" buffer +uint RateTransposerFloat::transposeMono(SAMPLETYPE *dest, const SAMPLETYPE *src, uint nSamples) +{ + unsigned int i, used; + + used = 0; + i = 0; + + // Process the last sample saved from the previous call first... + while (fSlopeCount <= 1.0f) + { + dest[i] = (SAMPLETYPE)((1.0f - fSlopeCount) * sPrevSampleL + fSlopeCount * src[0]); + i++; + fSlopeCount += fRate; + } + fSlopeCount -= 1.0f; + + if (nSamples > 1) + { + while (1) + { + while (fSlopeCount > 1.0f) + { + fSlopeCount -= 1.0f; + used ++; + if (used >= nSamples - 1) goto end; + } + dest[i] = (SAMPLETYPE)((1.0f - fSlopeCount) * src[used] + fSlopeCount * src[used + 1]); + i++; + fSlopeCount += fRate; + } + } +end: + // Store the last sample for the next round + sPrevSampleL = src[nSamples - 1]; + + return i; +} + + +// Transposes the sample rate of the given samples using linear interpolation. +// 'Mono' version of the routine. Returns the number of samples returned in +// the "dest" buffer +uint RateTransposerFloat::transposeStereo(SAMPLETYPE *dest, const SAMPLETYPE *src, uint nSamples) +{ + unsigned int srcPos, i, used; + + if (nSamples == 0) return 0; // no samples, no work + + used = 0; + i = 0; + + // Process the last sample saved from the sPrevSampleLious call first... + while (fSlopeCount <= 1.0f) + { + dest[2 * i] = (SAMPLETYPE)((1.0f - fSlopeCount) * sPrevSampleL + fSlopeCount * src[0]); + dest[2 * i + 1] = (SAMPLETYPE)((1.0f - fSlopeCount) * sPrevSampleR + fSlopeCount * src[1]); + i++; + fSlopeCount += fRate; + } + // now always (iSlopeCount > 1.0f) + fSlopeCount -= 1.0f; + + if (nSamples > 1) + { + while (1) + { + while (fSlopeCount > 1.0f) + { + fSlopeCount -= 1.0f; + used ++; + if (used >= nSamples - 1) goto end; + } + srcPos = 2 * used; + + dest[2 * i] = (SAMPLETYPE)((1.0f - fSlopeCount) * src[srcPos] + + fSlopeCount * src[srcPos + 2]); + dest[2 * i + 1] = (SAMPLETYPE)((1.0f - fSlopeCount) * src[srcPos + 1] + + fSlopeCount * src[srcPos + 3]); + + i++; + fSlopeCount += fRate; + } + } +end: + // Store the last sample for the next round + sPrevSampleL = src[2 * nSamples - 2]; + sPrevSampleR = src[2 * nSamples - 1]; + + return i; +} diff --git a/pysoundtouch/soundtouch/source/SoundTouch/RateTransposer.h b/pysoundtouch/soundtouch/source/SoundTouch/RateTransposer.h new file mode 100644 index 0000000..f035af2 --- /dev/null +++ b/pysoundtouch/soundtouch/source/SoundTouch/RateTransposer.h @@ -0,0 +1,159 @@ +//////////////////////////////////////////////////////////////////////////////// +/// +/// Sample rate transposer. Changes sample rate by using linear interpolation +/// together with anti-alias filtering (first order interpolation with anti- +/// alias filtering should be quite adequate for this application). +/// +/// Use either of the derived classes of 'RateTransposerInteger' or +/// 'RateTransposerFloat' for corresponding integer/floating point tranposing +/// algorithm implementation. +/// +/// Author : Copyright (c) Olli Parviainen +/// Author e-mail : oparviai 'at' iki.fi +/// SoundTouch WWW: http://www.surina.net/soundtouch +/// +//////////////////////////////////////////////////////////////////////////////// +// +// Last changed : $Date: 2009-02-21 18:00:14 +0200 (Sat, 21 Feb 2009) $ +// File revision : $Revision: 4 $ +// +// $Id: RateTransposer.h 63 2009-02-21 16:00:14Z oparviai $ +// +//////////////////////////////////////////////////////////////////////////////// +// +// License : +// +// SoundTouch audio processing library +// Copyright (c) Olli Parviainen +// +// 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 library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +//////////////////////////////////////////////////////////////////////////////// + +#ifndef RateTransposer_H +#define RateTransposer_H + +#include +#include "AAFilter.h" +#include "FIFOSamplePipe.h" +#include "FIFOSampleBuffer.h" + +#include "STTypes.h" + +namespace soundtouch +{ + +/// A common linear samplerate transposer class. +/// +/// Note: Use function "RateTransposer::newInstance()" to create a new class +/// instance instead of the "new" operator; that function automatically +/// chooses a correct implementation depending on if integer or floating +/// arithmetics are to be used. +class RateTransposer : public FIFOProcessor +{ +protected: + /// Anti-alias filter object + AAFilter *pAAFilter; + + float fRate; + + int numChannels; + + /// Buffer for collecting samples to feed the anti-alias filter between + /// two batches + FIFOSampleBuffer storeBuffer; + + /// Buffer for keeping samples between transposing & anti-alias filter + FIFOSampleBuffer tempBuffer; + + /// Output sample buffer + FIFOSampleBuffer outputBuffer; + + BOOL bUseAAFilter; + + virtual void resetRegisters() = 0; + + virtual uint transposeStereo(SAMPLETYPE *dest, + const SAMPLETYPE *src, + uint numSamples) = 0; + virtual uint transposeMono(SAMPLETYPE *dest, + const SAMPLETYPE *src, + uint numSamples) = 0; + inline uint transpose(SAMPLETYPE *dest, + const SAMPLETYPE *src, + uint numSamples); + + void downsample(const SAMPLETYPE *src, + uint numSamples); + void upsample(const SAMPLETYPE *src, + uint numSamples); + + /// Transposes sample rate by applying anti-alias filter to prevent folding. + /// Returns amount of samples returned in the "dest" buffer. + /// The maximum amount of samples that can be returned at a time is set by + /// the 'set_returnBuffer_size' function. + void processSamples(const SAMPLETYPE *src, + uint numSamples); + + +public: + RateTransposer(); + virtual ~RateTransposer(); + + /// Operator 'new' is overloaded so that it automatically creates a suitable instance + /// depending on if we're to use integer or floating point arithmetics. + static void *operator new(size_t s); + + /// Use this function instead of "new" operator to create a new instance of this class. + /// This function automatically chooses a correct implementation, depending on if + /// integer ot floating point arithmetics are to be used. + static RateTransposer *newInstance(); + + /// Returns the output buffer object + FIFOSamplePipe *getOutput() { return &outputBuffer; }; + + /// Returns the store buffer object + FIFOSamplePipe *getStore() { return &storeBuffer; }; + + /// Return anti-alias filter object + AAFilter *getAAFilter(); + + /// Enables/disables the anti-alias filter. Zero to disable, nonzero to enable + void enableAAFilter(BOOL newMode); + + /// Returns nonzero if anti-alias filter is enabled. + BOOL isAAFilterEnabled() const; + + /// Sets new target rate. Normal rate = 1.0, smaller values represent slower + /// rate, larger faster rates. + virtual void setRate(float newRate); + + /// Sets the number of channels, 1 = mono, 2 = stereo + void setChannels(int channels); + + /// Adds 'numSamples' pcs of samples from the 'samples' memory position into + /// the input of the object. + void putSamples(const SAMPLETYPE *samples, uint numSamples); + + /// Clears all the samples in the object + void clear(); + + /// Returns nonzero if there aren't any samples available for outputting. + int isEmpty() const; +}; + +} + +#endif diff --git a/pysoundtouch/soundtouch/source/SoundTouch/SoundTouch.cpp b/pysoundtouch/soundtouch/source/SoundTouch/SoundTouch.cpp new file mode 100644 index 0000000..aa7ac02 --- /dev/null +++ b/pysoundtouch/soundtouch/source/SoundTouch/SoundTouch.cpp @@ -0,0 +1,480 @@ +////////////////////////////////////////////////////////////////////////////// +/// +/// SoundTouch - main class for tempo/pitch/rate adjusting routines. +/// +/// Notes: +/// - Initialize the SoundTouch object instance by setting up the sound stream +/// parameters with functions 'setSampleRate' and 'setChannels', then set +/// desired tempo/pitch/rate settings with the corresponding functions. +/// +/// - The SoundTouch class behaves like a first-in-first-out pipeline: The +/// samples that are to be processed are fed into one of the pipe by calling +/// function 'putSamples', while the ready processed samples can be read +/// from the other end of the pipeline with function 'receiveSamples'. +/// +/// - The SoundTouch processing classes require certain sized 'batches' of +/// samples in order to process the sound. For this reason the classes buffer +/// incoming samples until there are enough of samples available for +/// processing, then they carry out the processing step and consequently +/// make the processed samples available for outputting. +/// +/// - For the above reason, the processing routines introduce a certain +/// 'latency' between the input and output, so that the samples input to +/// SoundTouch may not be immediately available in the output, and neither +/// the amount of outputtable samples may not immediately be in direct +/// relationship with the amount of previously input samples. +/// +/// - The tempo/pitch/rate control parameters can be altered during processing. +/// Please notice though that they aren't currently protected by semaphores, +/// so in multi-thread application external semaphore protection may be +/// required. +/// +/// - This class utilizes classes 'TDStretch' for tempo change (without modifying +/// pitch) and 'RateTransposer' for changing the playback rate (that is, both +/// tempo and pitch in the same ratio) of the sound. The third available control +/// 'pitch' (change pitch but maintain tempo) is produced by a combination of +/// combining the two other controls. +/// +/// Author : Copyright (c) Olli Parviainen +/// Author e-mail : oparviai 'at' iki.fi +/// SoundTouch WWW: http://www.surina.net/soundtouch +/// +//////////////////////////////////////////////////////////////////////////////// +// +// Last changed : $Date: 2009-05-19 07:57:30 +0300 (Tue, 19 May 2009) $ +// File revision : $Revision: 4 $ +// +// $Id: SoundTouch.cpp 73 2009-05-19 04:57:30Z oparviai $ +// +//////////////////////////////////////////////////////////////////////////////// +// +// License : +// +// SoundTouch audio processing library +// Copyright (c) Olli Parviainen +// +// 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 library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +//////////////////////////////////////////////////////////////////////////////// + +#include +#include +#include +#include +#include +#include + +#include "SoundTouch.h" +#include "TDStretch.h" +#include "RateTransposer.h" +#include "cpu_detect.h" + +using namespace soundtouch; + +/// test if two floating point numbers are equal +#define TEST_FLOAT_EQUAL(a, b) (fabs(a - b) < 1e-10) + + +/// Print library version string for autoconf +extern "C" void soundtouch_ac_test() +{ + printf("SoundTouch Version: %s\n",SOUNDTOUCH_VERSION); +} + + +SoundTouch::SoundTouch() +{ + // Initialize rate transposer and tempo changer instances + + pRateTransposer = RateTransposer::newInstance(); + pTDStretch = TDStretch::newInstance(); + + setOutPipe(pTDStretch); + + rate = tempo = 0; + + virtualPitch = + virtualRate = + virtualTempo = 1.0; + + calcEffectiveRateAndTempo(); + + channels = 0; + bSrateSet = FALSE; +} + + + +SoundTouch::~SoundTouch() +{ + delete pRateTransposer; + delete pTDStretch; +} + + + +/// Get SoundTouch library version string +const char *SoundTouch::getVersionString() +{ + static const char *_version = SOUNDTOUCH_VERSION; + + return _version; +} + + +/// Get SoundTouch library version Id +uint SoundTouch::getVersionId() +{ + return SOUNDTOUCH_VERSION_ID; +} + + +// Sets the number of channels, 1 = mono, 2 = stereo +void SoundTouch::setChannels(uint numChannels) +{ + if (numChannels != 1 && numChannels != 2) + { + throw std::runtime_error("Illegal number of channels"); + } + channels = numChannels; + pRateTransposer->setChannels((int)numChannels); + pTDStretch->setChannels((int)numChannels); +} + + + +// Sets new rate control value. Normal rate = 1.0, smaller values +// represent slower rate, larger faster rates. +void SoundTouch::setRate(float newRate) +{ + virtualRate = newRate; + calcEffectiveRateAndTempo(); +} + + + +// Sets new rate control value as a difference in percents compared +// to the original rate (-50 .. +100 %) +void SoundTouch::setRateChange(float newRate) +{ + virtualRate = 1.0f + 0.01f * newRate; + calcEffectiveRateAndTempo(); +} + + + +// Sets new tempo control value. Normal tempo = 1.0, smaller values +// represent slower tempo, larger faster tempo. +void SoundTouch::setTempo(float newTempo) +{ + virtualTempo = newTempo; + calcEffectiveRateAndTempo(); +} + + + +// Sets new tempo control value as a difference in percents compared +// to the original tempo (-50 .. +100 %) +void SoundTouch::setTempoChange(float newTempo) +{ + virtualTempo = 1.0f + 0.01f * newTempo; + calcEffectiveRateAndTempo(); +} + + + +// Sets new pitch control value. Original pitch = 1.0, smaller values +// represent lower pitches, larger values higher pitch. +void SoundTouch::setPitch(float newPitch) +{ + virtualPitch = newPitch; + calcEffectiveRateAndTempo(); +} + + + +// Sets pitch change in octaves compared to the original pitch +// (-1.00 .. +1.00) +void SoundTouch::setPitchOctaves(float newPitch) +{ + virtualPitch = (float)exp(0.69314718056f * newPitch); + calcEffectiveRateAndTempo(); +} + + + +// Sets pitch change in semi-tones compared to the original pitch +// (-12 .. +12) +void SoundTouch::setPitchSemiTones(int newPitch) +{ + setPitchOctaves((float)newPitch / 12.0f); +} + + + +void SoundTouch::setPitchSemiTones(float newPitch) +{ + setPitchOctaves(newPitch / 12.0f); +} + + +// Calculates 'effective' rate and tempo values from the +// nominal control values. +void SoundTouch::calcEffectiveRateAndTempo() +{ + float oldTempo = tempo; + float oldRate = rate; + + tempo = virtualTempo / virtualPitch; + rate = virtualPitch * virtualRate; + + if (!TEST_FLOAT_EQUAL(rate,oldRate)) pRateTransposer->setRate(rate); + if (!TEST_FLOAT_EQUAL(tempo, oldTempo)) pTDStretch->setTempo(tempo); + +#ifndef PREVENT_CLICK_AT_RATE_CROSSOVER + if (rate <= 1.0f) + { + if (output != pTDStretch) + { + FIFOSamplePipe *tempoOut; + + assert(output == pRateTransposer); + // move samples in the current output buffer to the output of pTDStretch + tempoOut = pTDStretch->getOutput(); + tempoOut->moveSamples(*output); + // move samples in pitch transposer's store buffer to tempo changer's input + pTDStretch->moveSamples(*pRateTransposer->getStore()); + + output = pTDStretch; + } + } + else +#endif + { + if (output != pRateTransposer) + { + FIFOSamplePipe *transOut; + + assert(output == pTDStretch); + // move samples in the current output buffer to the output of pRateTransposer + transOut = pRateTransposer->getOutput(); + transOut->moveSamples(*output); + // move samples in tempo changer's input to pitch transposer's input + pRateTransposer->moveSamples(*pTDStretch->getInput()); + + output = pRateTransposer; + } + } +} + + +// Sets sample rate. +void SoundTouch::setSampleRate(uint srate) +{ + bSrateSet = TRUE; + // set sample rate, leave other tempo changer parameters as they are. + pTDStretch->setParameters((int)srate); +} + + +// Adds 'numSamples' pcs of samples from the 'samples' memory position into +// the input of the object. +void SoundTouch::putSamples(const SAMPLETYPE *samples, uint nSamples) +{ + if (bSrateSet == FALSE) + { + throw std::runtime_error("SoundTouch : Sample rate not defined"); + } + else if (channels == 0) + { + throw std::runtime_error("SoundTouch : Number of channels not defined"); + } + + // Transpose the rate of the new samples if necessary + /* Bypass the nominal setting - can introduce a click in sound when tempo/pitch control crosses the nominal value... + if (rate == 1.0f) + { + // The rate value is same as the original, simply evaluate the tempo changer. + assert(output == pTDStretch); + if (pRateTransposer->isEmpty() == 0) + { + // yet flush the last samples in the pitch transposer buffer + // (may happen if 'rate' changes from a non-zero value to zero) + pTDStretch->moveSamples(*pRateTransposer); + } + pTDStretch->putSamples(samples, nSamples); + } + */ +#ifndef PREVENT_CLICK_AT_RATE_CROSSOVER + else if (rate <= 1.0f) + { + // transpose the rate down, output the transposed sound to tempo changer buffer + assert(output == pTDStretch); + pRateTransposer->putSamples(samples, nSamples); + pTDStretch->moveSamples(*pRateTransposer); + } + else +#endif + { + // evaluate the tempo changer, then transpose the rate up, + assert(output == pRateTransposer); + pTDStretch->putSamples(samples, nSamples); + pRateTransposer->moveSamples(*pTDStretch); + } +} + + +// Flushes the last samples from the processing pipeline to the output. +// Clears also the internal processing buffers. +// +// Note: This function is meant for extracting the last samples of a sound +// stream. This function may introduce additional blank samples in the end +// of the sound stream, and thus it's not recommended to call this function +// in the middle of a sound stream. +void SoundTouch::flush() +{ + int i; + uint nOut; + SAMPLETYPE buff[128]; + + nOut = numSamples(); + + memset(buff, 0, 128 * sizeof(SAMPLETYPE)); + // "Push" the last active samples out from the processing pipeline by + // feeding blank samples into the processing pipeline until new, + // processed samples appear in the output (not however, more than + // 8ksamples in any case) + for (i = 0; i < 128; i ++) + { + putSamples(buff, 64); + if (numSamples() != nOut) break; // new samples have appeared in the output! + } + + // Clear working buffers + pRateTransposer->clear(); + pTDStretch->clearInput(); + // yet leave the 'tempoChanger' output intouched as that's where the + // flushed samples are! +} + + +// Changes a setting controlling the processing system behaviour. See the +// 'SETTING_...' defines for available setting ID's. +BOOL SoundTouch::setSetting(int settingId, int value) +{ + int sampleRate, sequenceMs, seekWindowMs, overlapMs; + + // read current tdstretch routine parameters + pTDStretch->getParameters(&sampleRate, &sequenceMs, &seekWindowMs, &overlapMs); + + switch (settingId) + { + case SETTING_USE_AA_FILTER : + // enables / disabless anti-alias filter + pRateTransposer->enableAAFilter((value != 0) ? TRUE : FALSE); + return TRUE; + + case SETTING_AA_FILTER_LENGTH : + // sets anti-alias filter length + pRateTransposer->getAAFilter()->setLength(value); + return TRUE; + + case SETTING_USE_QUICKSEEK : + // enables / disables tempo routine quick seeking algorithm + pTDStretch->enableQuickSeek((value != 0) ? TRUE : FALSE); + return TRUE; + + case SETTING_SEQUENCE_MS: + // change time-stretch sequence duration parameter + pTDStretch->setParameters(sampleRate, value, seekWindowMs, overlapMs); + return TRUE; + + case SETTING_SEEKWINDOW_MS: + // change time-stretch seek window length parameter + pTDStretch->setParameters(sampleRate, sequenceMs, value, overlapMs); + return TRUE; + + case SETTING_OVERLAP_MS: + // change time-stretch overlap length parameter + pTDStretch->setParameters(sampleRate, sequenceMs, seekWindowMs, value); + return TRUE; + + default : + return FALSE; + } +} + + +// Reads a setting controlling the processing system behaviour. See the +// 'SETTING_...' defines for available setting ID's. +// +// Returns the setting value. +int SoundTouch::getSetting(int settingId) const +{ + int temp; + + switch (settingId) + { + case SETTING_USE_AA_FILTER : + return (uint)pRateTransposer->isAAFilterEnabled(); + + case SETTING_AA_FILTER_LENGTH : + return pRateTransposer->getAAFilter()->getLength(); + + case SETTING_USE_QUICKSEEK : + return (uint) pTDStretch->isQuickSeekEnabled(); + + case SETTING_SEQUENCE_MS: + pTDStretch->getParameters(NULL, &temp, NULL, NULL); + return temp; + + case SETTING_SEEKWINDOW_MS: + pTDStretch->getParameters(NULL, NULL, &temp, NULL); + return temp; + + case SETTING_OVERLAP_MS: + pTDStretch->getParameters(NULL, NULL, NULL, &temp); + return temp; + + default : + return 0; + } +} + + +// Clears all the samples in the object's output and internal processing +// buffers. +void SoundTouch::clear() +{ + pRateTransposer->clear(); + pTDStretch->clear(); +} + + + +/// Returns number of samples currently unprocessed. +uint SoundTouch::numUnprocessedSamples() const +{ + FIFOSamplePipe * psp; + if (pTDStretch) + { + psp = pTDStretch->getInput(); + if (psp) + { + return psp->numSamples(); + } + } + return 0; +} diff --git a/pysoundtouch/soundtouch/source/SoundTouch/SoundTouch.dsp b/pysoundtouch/soundtouch/source/SoundTouch/SoundTouch.dsp new file mode 100644 index 0000000..add29c6 --- /dev/null +++ b/pysoundtouch/soundtouch/source/SoundTouch/SoundTouch.dsp @@ -0,0 +1,188 @@ +# Microsoft Developer Studio Project File - Name="SoundTouch" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=SoundTouch - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "SoundTouch.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "SoundTouch.mak" CFG="SoundTouch - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "SoundTouch - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "SoundTouch - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "SoundTouch - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /W3 /GX /Zi /O2 /I "..\..\include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD BASE RSC /l 0x40b /d "NDEBUG" +# ADD RSC /l 0x40b /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Cmds=copy .\Release\SoundTouch.lib ..\..\lib\ +# End Special Build Tool + +!ELSEIF "$(CFG)" == "SoundTouch - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /FR /YX /FD /GZ /c +# ADD BASE RSC /l 0x40b /d "_DEBUG" +# ADD RSC /l 0x40b /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"Debug\SoundTouchD.lib" +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Cmds=copy .\Debug\SoundTouchD.lib ..\..\lib\ +# End Special Build Tool + +!ENDIF + +# Begin Target + +# Name "SoundTouch - Win32 Release" +# Name "SoundTouch - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Group "bpm" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\BPMDetect.cpp +# End Source File +# Begin Source File + +SOURCE=.\PeakFinder.cpp +# End Source File +# End Group +# Begin Source File + +SOURCE=.\3dnow_win.cpp +# End Source File +# Begin Source File + +SOURCE=.\AAFilter.cpp +# End Source File +# Begin Source File + +SOURCE=.\cpu_detect_x86_win.cpp +# End Source File +# Begin Source File + +SOURCE=.\FIFOSampleBuffer.cpp +# End Source File +# Begin Source File + +SOURCE=.\FIRFilter.cpp +# End Source File +# Begin Source File + +SOURCE=.\mmx_optimized.cpp +# End Source File +# Begin Source File + +SOURCE=.\RateTransposer.cpp +# End Source File +# Begin Source File + +SOURCE=.\SoundTouch.cpp +# End Source File +# Begin Source File + +SOURCE=.\sse_optimized.cpp +# End Source File +# Begin Source File + +SOURCE=.\TDStretch.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\AAFilter.h +# End Source File +# Begin Source File + +SOURCE=.\cpu_detect.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\FIFOSampleBuffer.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\FIFOSamplePipe.h +# End Source File +# Begin Source File + +SOURCE=.\FIRFilter.h +# End Source File +# Begin Source File + +SOURCE=.\RateTransposer.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\SoundTouch.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\STTypes.h +# End Source File +# Begin Source File + +SOURCE=.\TDStretch.h +# End Source File +# End Group +# End Target +# End Project diff --git a/pysoundtouch/soundtouch/source/SoundTouch/SoundTouch.dsw b/pysoundtouch/soundtouch/source/SoundTouch/SoundTouch.dsw new file mode 100644 index 0000000..daf6437 --- /dev/null +++ b/pysoundtouch/soundtouch/source/SoundTouch/SoundTouch.dsw @@ -0,0 +1,31 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! +# +# $Id: SoundTouch.dsw 11 2008-02-10 16:26:55Z oparviai $ + +############################################################################### + +Project: "SoundTouch"=.\SoundTouch.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/pysoundtouch/soundtouch/source/SoundTouch/SoundTouch.sln b/pysoundtouch/soundtouch/source/SoundTouch/SoundTouch.sln new file mode 100644 index 0000000..6015e96 --- /dev/null +++ b/pysoundtouch/soundtouch/source/SoundTouch/SoundTouch.sln @@ -0,0 +1,21 @@ +Microsoft Visual Studio Solution File, Format Version 8.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SoundTouch", "SoundTouch.vcproj", "{0A626C77-0515-4131-AA80-E0BFFC479FEB}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + Debug = Debug + Release = Release + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {0A626C77-0515-4131-AA80-E0BFFC479FEB}.Debug.ActiveCfg = Debug|Win32 + {0A626C77-0515-4131-AA80-E0BFFC479FEB}.Debug.Build.0 = Debug|Win32 + {0A626C77-0515-4131-AA80-E0BFFC479FEB}.Release.ActiveCfg = Release|Win32 + {0A626C77-0515-4131-AA80-E0BFFC479FEB}.Release.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/pysoundtouch/soundtouch/source/SoundTouch/SoundTouch.vcproj b/pysoundtouch/soundtouch/source/SoundTouch/SoundTouch.vcproj new file mode 100644 index 0000000..62a3d55 --- /dev/null +++ b/pysoundtouch/soundtouch/source/SoundTouch/SoundTouch.vcproj @@ -0,0 +1,353 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pysoundtouch/soundtouch/source/SoundTouch/TDStretch.cpp b/pysoundtouch/soundtouch/source/SoundTouch/TDStretch.cpp new file mode 100644 index 0000000..232133b --- /dev/null +++ b/pysoundtouch/soundtouch/source/SoundTouch/TDStretch.cpp @@ -0,0 +1,1045 @@ +//////////////////////////////////////////////////////////////////////////////// +/// +/// Sampled sound tempo changer/time stretch algorithm. Changes the sound tempo +/// while maintaining the original pitch by using a time domain WSOLA-like +/// method with several performance-increasing tweaks. +/// +/// Note : MMX optimized functions reside in a separate, platform-specific +/// file, e.g. 'mmx_win.cpp' or 'mmx_gcc.cpp' +/// +/// Author : Copyright (c) Olli Parviainen +/// Author e-mail : oparviai 'at' iki.fi +/// SoundTouch WWW: http://www.surina.net/soundtouch +/// +//////////////////////////////////////////////////////////////////////////////// +// +// Last changed : $Date: 2009-12-28 21:27:04 +0200 (Mon, 28 Dec 2009) $ +// File revision : $Revision: 1.12 $ +// +// $Id: TDStretch.cpp 77 2009-12-28 19:27:04Z oparviai $ +// +//////////////////////////////////////////////////////////////////////////////// +// +// License : +// +// SoundTouch audio processing library +// Copyright (c) Olli Parviainen +// +// 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 library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +//////////////////////////////////////////////////////////////////////////////// + +#include +#include +#include +#include +#include +#include + +#include "STTypes.h" +#include "cpu_detect.h" +#include "TDStretch.h" + +#include + +using namespace soundtouch; + +#define max(x, y) (((x) > (y)) ? (x) : (y)) + + +/***************************************************************************** + * + * Constant definitions + * + *****************************************************************************/ + +// Table for the hierarchical mixing position seeking algorithm +static const short _scanOffsets[5][24]={ + { 124, 186, 248, 310, 372, 434, 496, 558, 620, 682, 744, 806, + 868, 930, 992, 1054, 1116, 1178, 1240, 1302, 1364, 1426, 1488, 0}, + {-100, -75, -50, -25, 25, 50, 75, 100, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { -20, -15, -10, -5, 5, 10, 15, 20, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { -4, -3, -2, -1, 1, 2, 3, 4, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 121, 114, 97, 114, 98, 105, 108, 32, 104, 99, 117, 111, + 116, 100, 110, 117, 111, 115, 0, 0, 0, 0, 0, 0}}; + +/***************************************************************************** + * + * Implementation of the class 'TDStretch' + * + *****************************************************************************/ + + +TDStretch::TDStretch() : FIFOProcessor(&outputBuffer) +{ + bQuickSeek = FALSE; + channels = 2; + + pMidBuffer = NULL; + pRefMidBufferUnaligned = NULL; + overlapLength = 0; + + bAutoSeqSetting = TRUE; + bAutoSeekSetting = TRUE; + +// outDebt = 0; + skipFract = 0; + + tempo = 1.0f; + setParameters(44100, DEFAULT_SEQUENCE_MS, DEFAULT_SEEKWINDOW_MS, DEFAULT_OVERLAP_MS); + setTempo(1.0f); + + clear(); +} + + + +TDStretch::~TDStretch() +{ + delete[] pMidBuffer; + delete[] pRefMidBufferUnaligned; +} + + + +// Sets routine control parameters. These control are certain time constants +// defining how the sound is stretched to the desired duration. +// +// 'sampleRate' = sample rate of the sound +// 'sequenceMS' = one processing sequence length in milliseconds (default = 82 ms) +// 'seekwindowMS' = seeking window length for scanning the best overlapping +// position (default = 28 ms) +// 'overlapMS' = overlapping length (default = 12 ms) + +void TDStretch::setParameters(int aSampleRate, int aSequenceMS, + int aSeekWindowMS, int aOverlapMS) +{ + // accept only positive parameter values - if zero or negative, use old values instead + if (aSampleRate > 0) this->sampleRate = aSampleRate; + if (aOverlapMS > 0) this->overlapMs = aOverlapMS; + + if (aSequenceMS > 0) + { + this->sequenceMs = aSequenceMS; + bAutoSeqSetting = FALSE; + } + else if (aSequenceMS == 0) + { + // if zero, use automatic setting + bAutoSeqSetting = TRUE; + } + + if (aSeekWindowMS > 0) + { + this->seekWindowMs = aSeekWindowMS; + bAutoSeekSetting = FALSE; + } + else if (aSeekWindowMS == 0) + { + // if zero, use automatic setting + bAutoSeekSetting = TRUE; + } + + calcSeqParameters(); + + calculateOverlapLength(overlapMs); + + // set tempo to recalculate 'sampleReq' + setTempo(tempo); + +} + + + +/// Get routine control parameters, see setParameters() function. +/// Any of the parameters to this function can be NULL, in such case corresponding parameter +/// value isn't returned. +void TDStretch::getParameters(int *pSampleRate, int *pSequenceMs, int *pSeekWindowMs, int *pOverlapMs) const +{ + if (pSampleRate) + { + *pSampleRate = sampleRate; + } + + if (pSequenceMs) + { + *pSequenceMs = (bAutoSeqSetting) ? (USE_AUTO_SEQUENCE_LEN) : sequenceMs; + } + + if (pSeekWindowMs) + { + *pSeekWindowMs = (bAutoSeekSetting) ? (USE_AUTO_SEEKWINDOW_LEN) : seekWindowMs; + } + + if (pOverlapMs) + { + *pOverlapMs = overlapMs; + } +} + + +// Overlaps samples in 'midBuffer' with the samples in 'pInput' +void TDStretch::overlapMono(SAMPLETYPE *pOutput, const SAMPLETYPE *pInput) const +{ + int i, itemp; + + for (i = 0; i < overlapLength ; i ++) + { + itemp = overlapLength - i; + pOutput[i] = (pInput[i] * i + pMidBuffer[i] * itemp ) / overlapLength; // >> overlapDividerBits; + } +} + + + +void TDStretch::clearMidBuffer() +{ + memset(pMidBuffer, 0, 2 * sizeof(SAMPLETYPE) * overlapLength); +} + + +void TDStretch::clearInput() +{ + inputBuffer.clear(); + clearMidBuffer(); +} + + +// Clears the sample buffers +void TDStretch::clear() +{ + outputBuffer.clear(); + clearInput(); +} + + + +// Enables/disables the quick position seeking algorithm. Zero to disable, nonzero +// to enable +void TDStretch::enableQuickSeek(BOOL enable) +{ + bQuickSeek = enable; +} + + +// Returns nonzero if the quick seeking algorithm is enabled. +BOOL TDStretch::isQuickSeekEnabled() const +{ + return bQuickSeek; +} + + +// Seeks for the optimal overlap-mixing position. +int TDStretch::seekBestOverlapPosition(const SAMPLETYPE *refPos) +{ + if (channels == 2) + { + // stereo sound + if (bQuickSeek) + { + return seekBestOverlapPositionStereoQuick(refPos); + } + else + { + return seekBestOverlapPositionStereo(refPos); + } + } + else + { + // mono sound + if (bQuickSeek) + { + return seekBestOverlapPositionMonoQuick(refPos); + } + else + { + return seekBestOverlapPositionMono(refPos); + } + } +} + + + + +// Overlaps samples in 'midBuffer' with the samples in 'pInputBuffer' at position +// of 'ovlPos'. +inline void TDStretch::overlap(SAMPLETYPE *pOutput, const SAMPLETYPE *pInput, uint ovlPos) const +{ + if (channels == 2) + { + // stereo sound + overlapStereo(pOutput, pInput + 2 * ovlPos); + } else { + // mono sound. + overlapMono(pOutput, pInput + ovlPos); + } +} + + + + +// Seeks for the optimal overlap-mixing position. The 'stereo' version of the +// routine +// +// The best position is determined as the position where the two overlapped +// sample sequences are 'most alike', in terms of the highest cross-correlation +// value over the overlapping period +int TDStretch::seekBestOverlapPositionStereo(const SAMPLETYPE *refPos) +{ + int bestOffs; + double bestCorr, corr; + int i; + + // Slopes the amplitudes of the 'midBuffer' samples + precalcCorrReferenceStereo(); + + bestCorr = FLT_MIN; + bestOffs = 0; + + // Scans for the best correlation value by testing each possible position + // over the permitted range. + for (i = 0; i < seekLength; i ++) + { + // Calculates correlation value for the mixing position corresponding + // to 'i' + corr = (double)calcCrossCorrStereo(refPos + 2 * i, pRefMidBuffer); + // heuristic rule to slightly favour values close to mid of the range + double tmp = (double)(2 * i - seekLength) / (double)seekLength; + corr = ((corr + 0.1) * (1.0 - 0.25 * tmp * tmp)); + + // Checks for the highest correlation value + if (corr > bestCorr) + { + bestCorr = corr; + bestOffs = i; + } + } + // clear cross correlation routine state if necessary (is so e.g. in MMX routines). + clearCrossCorrState(); + + return bestOffs; +} + + +// Seeks for the optimal overlap-mixing position. The 'stereo' version of the +// routine +// +// The best position is determined as the position where the two overlapped +// sample sequences are 'most alike', in terms of the highest cross-correlation +// value over the overlapping period +int TDStretch::seekBestOverlapPositionStereoQuick(const SAMPLETYPE *refPos) +{ + int j; + int bestOffs; + double bestCorr, corr; + int scanCount, corrOffset, tempOffset; + + // Slopes the amplitude of the 'midBuffer' samples + precalcCorrReferenceStereo(); + + bestCorr = FLT_MIN; + bestOffs = _scanOffsets[0][0]; + corrOffset = 0; + tempOffset = 0; + + // Scans for the best correlation value using four-pass hierarchical search. + // + // The look-up table 'scans' has hierarchical position adjusting steps. + // In first pass the routine searhes for the highest correlation with + // relatively coarse steps, then rescans the neighbourhood of the highest + // correlation with better resolution and so on. + for (scanCount = 0;scanCount < 4; scanCount ++) + { + j = 0; + while (_scanOffsets[scanCount][j]) + { + tempOffset = corrOffset + _scanOffsets[scanCount][j]; + if (tempOffset >= seekLength) break; + + // Calculates correlation value for the mixing position corresponding + // to 'tempOffset' + corr = (double)calcCrossCorrStereo(refPos + 2 * tempOffset, pRefMidBuffer); + // heuristic rule to slightly favour values close to mid of the range + double tmp = (double)(2 * tempOffset - seekLength) / seekLength; + corr = ((corr + 0.1) * (1.0 - 0.25 * tmp * tmp)); + + // Checks for the highest correlation value + if (corr > bestCorr) + { + bestCorr = corr; + bestOffs = tempOffset; + } + j ++; + } + corrOffset = bestOffs; + } + // clear cross correlation routine state if necessary (is so e.g. in MMX routines). + clearCrossCorrState(); + + return bestOffs; +} + + + +// Seeks for the optimal overlap-mixing position. The 'mono' version of the +// routine +// +// The best position is determined as the position where the two overlapped +// sample sequences are 'most alike', in terms of the highest cross-correlation +// value over the overlapping period +int TDStretch::seekBestOverlapPositionMono(const SAMPLETYPE *refPos) +{ + int bestOffs; + double bestCorr, corr; + int tempOffset; + const SAMPLETYPE *compare; + + // Slopes the amplitude of the 'midBuffer' samples + precalcCorrReferenceMono(); + + bestCorr = FLT_MIN; + bestOffs = 0; + + // Scans for the best correlation value by testing each possible position + // over the permitted range. + for (tempOffset = 0; tempOffset < seekLength; tempOffset ++) + { + compare = refPos + tempOffset; + + // Calculates correlation value for the mixing position corresponding + // to 'tempOffset' + corr = (double)calcCrossCorrMono(pRefMidBuffer, compare); + // heuristic rule to slightly favour values close to mid of the range + double tmp = (double)(2 * tempOffset - seekLength) / seekLength; + corr = ((corr + 0.1) * (1.0 - 0.25 * tmp * tmp)); + + // Checks for the highest correlation value + if (corr > bestCorr) + { + bestCorr = corr; + bestOffs = tempOffset; + } + } + // clear cross correlation routine state if necessary (is so e.g. in MMX routines). + clearCrossCorrState(); + + return bestOffs; +} + + +// Seeks for the optimal overlap-mixing position. The 'mono' version of the +// routine +// +// The best position is determined as the position where the two overlapped +// sample sequences are 'most alike', in terms of the highest cross-correlation +// value over the overlapping period +int TDStretch::seekBestOverlapPositionMonoQuick(const SAMPLETYPE *refPos) +{ + int j; + int bestOffs; + double bestCorr, corr; + int scanCount, corrOffset, tempOffset; + + // Slopes the amplitude of the 'midBuffer' samples + precalcCorrReferenceMono(); + + bestCorr = FLT_MIN; + bestOffs = _scanOffsets[0][0]; + corrOffset = 0; + tempOffset = 0; + + // Scans for the best correlation value using four-pass hierarchical search. + // + // The look-up table 'scans' has hierarchical position adjusting steps. + // In first pass the routine searhes for the highest correlation with + // relatively coarse steps, then rescans the neighbourhood of the highest + // correlation with better resolution and so on. + for (scanCount = 0;scanCount < 4; scanCount ++) + { + j = 0; + while (_scanOffsets[scanCount][j]) + { + tempOffset = corrOffset + _scanOffsets[scanCount][j]; + if (tempOffset >= seekLength) break; + + // Calculates correlation value for the mixing position corresponding + // to 'tempOffset' + corr = (double)calcCrossCorrMono(refPos + tempOffset, pRefMidBuffer); + // heuristic rule to slightly favour values close to mid of the range + double tmp = (double)(2 * tempOffset - seekLength) / seekLength; + corr = ((corr + 0.1) * (1.0 - 0.25 * tmp * tmp)); + + // Checks for the highest correlation value + if (corr > bestCorr) + { + bestCorr = corr; + bestOffs = tempOffset; + } + j ++; + } + corrOffset = bestOffs; + } + // clear cross correlation routine state if necessary (is so e.g. in MMX routines). + clearCrossCorrState(); + + return bestOffs; +} + + +/// clear cross correlation routine state if necessary +void TDStretch::clearCrossCorrState() +{ + // default implementation is empty. +} + + +/// Calculates processing sequence length according to tempo setting +void TDStretch::calcSeqParameters() +{ + // Adjust tempo param according to tempo, so that variating processing sequence length is used + // at varius tempo settings, between the given low...top limits + #define AUTOSEQ_TEMPO_LOW 0.5 // auto setting low tempo range (-50%) + #define AUTOSEQ_TEMPO_TOP 2.0 // auto setting top tempo range (+100%) + + // sequence-ms setting values at above low & top tempo + #define AUTOSEQ_AT_MIN 125.0 + #define AUTOSEQ_AT_MAX 50.0 + #define AUTOSEQ_K ((AUTOSEQ_AT_MAX - AUTOSEQ_AT_MIN) / (AUTOSEQ_TEMPO_TOP - AUTOSEQ_TEMPO_LOW)) + #define AUTOSEQ_C (AUTOSEQ_AT_MIN - (AUTOSEQ_K) * (AUTOSEQ_TEMPO_LOW)) + + // seek-window-ms setting values at above low & top tempo + #define AUTOSEEK_AT_MIN 25.0 + #define AUTOSEEK_AT_MAX 15.0 + #define AUTOSEEK_K ((AUTOSEEK_AT_MAX - AUTOSEEK_AT_MIN) / (AUTOSEQ_TEMPO_TOP - AUTOSEQ_TEMPO_LOW)) + #define AUTOSEEK_C (AUTOSEEK_AT_MIN - (AUTOSEEK_K) * (AUTOSEQ_TEMPO_LOW)) + + #define CHECK_LIMITS(x, mi, ma) (((x) < (mi)) ? (mi) : (((x) > (ma)) ? (ma) : (x))) + + double seq, seek; + + if (bAutoSeqSetting) + { + seq = AUTOSEQ_C + AUTOSEQ_K * tempo; + seq = CHECK_LIMITS(seq, AUTOSEQ_AT_MAX, AUTOSEQ_AT_MIN); + sequenceMs = (int)(seq + 0.5); + } + + if (bAutoSeekSetting) + { + seek = AUTOSEEK_C + AUTOSEEK_K * tempo; + seek = CHECK_LIMITS(seek, AUTOSEEK_AT_MAX, AUTOSEEK_AT_MIN); + seekWindowMs = (int)(seek + 0.5); + } + + // Update seek window lengths + seekWindowLength = (sampleRate * sequenceMs) / 1000; + if (seekWindowLength < 2 * overlapLength) + { + seekWindowLength = 2 * overlapLength; + } + seekLength = (sampleRate * seekWindowMs) / 1000; +} + + + +// Sets new target tempo. Normal tempo = 'SCALE', smaller values represent slower +// tempo, larger faster tempo. +void TDStretch::setTempo(float newTempo) +{ + int intskip; + + tempo = newTempo; + + // Calculate new sequence duration + calcSeqParameters(); + + // Calculate ideal skip length (according to tempo value) + nominalSkip = tempo * (seekWindowLength - overlapLength); + intskip = (int)(nominalSkip + 0.5f); + + // Calculate how many samples are needed in the 'inputBuffer' to + // process another batch of samples + //sampleReq = max(intskip + overlapLength, seekWindowLength) + seekLength / 2; + sampleReq = max(intskip + overlapLength, seekWindowLength) + seekLength; +} + + + +// Sets the number of channels, 1 = mono, 2 = stereo +void TDStretch::setChannels(int numChannels) +{ + assert(numChannels > 0); + if (channels == numChannels) return; + assert(numChannels == 1 || numChannels == 2); + + channels = numChannels; + inputBuffer.setChannels(channels); + outputBuffer.setChannels(channels); +} + + +// nominal tempo, no need for processing, just pass the samples through +// to outputBuffer +/* +void TDStretch::processNominalTempo() +{ + assert(tempo == 1.0f); + + if (bMidBufferDirty) + { + // If there are samples in pMidBuffer waiting for overlapping, + // do a single sliding overlapping with them in order to prevent a + // clicking distortion in the output sound + if (inputBuffer.numSamples() < overlapLength) + { + // wait until we've got overlapLength input samples + return; + } + // Mix the samples in the beginning of 'inputBuffer' with the + // samples in 'midBuffer' using sliding overlapping + overlap(outputBuffer.ptrEnd(overlapLength), inputBuffer.ptrBegin(), 0); + outputBuffer.putSamples(overlapLength); + inputBuffer.receiveSamples(overlapLength); + clearMidBuffer(); + // now we've caught the nominal sample flow and may switch to + // bypass mode + } + + // Simply bypass samples from input to output + outputBuffer.moveSamples(inputBuffer); +} +*/ + +#include + +// Processes as many processing frames of the samples 'inputBuffer', store +// the result into 'outputBuffer' +void TDStretch::processSamples() +{ + int ovlSkip, offset; + int temp; + + /* Removed this small optimization - can introduce a click to sound when tempo setting + crosses the nominal value + if (tempo == 1.0f) + { + // tempo not changed from the original, so bypass the processing + processNominalTempo(); + return; + } + */ + + // Process samples as long as there are enough samples in 'inputBuffer' + // to form a processing frame. +// while ((int)inputBuffer.numSamples() >= sampleReq - (outDebt / 4)) + while ((int)inputBuffer.numSamples() >= sampleReq) + { + // If tempo differs from the normal ('SCALE'), scan for the best overlapping + // position + offset = seekBestOverlapPosition(inputBuffer.ptrBegin()); + + // Mix the samples in the 'inputBuffer' at position of 'offset' with the + // samples in 'midBuffer' using sliding overlapping + // ... first partially overlap with the end of the previous sequence + // (that's in 'midBuffer') + overlap(outputBuffer.ptrEnd((uint)overlapLength), inputBuffer.ptrBegin(), (uint)offset); + outputBuffer.putSamples((uint)overlapLength); + + // ... then copy sequence samples from 'inputBuffer' to output: + temp = (seekLength / 2 - offset); + + // compensate cumulated output length diff vs. ideal output +// temp -= outDebt / 4; + + // update ideal vs. true output difference +// outDebt += temp; + + // length of sequence +// temp += (seekWindowLength - 2 * overlapLength); + temp = (seekWindowLength - 2 * overlapLength); + + // crosscheck that we don't have buffer overflow... + if ((int)inputBuffer.numSamples() < (offset + temp + overlapLength * 2)) + { + continue; // just in case, shouldn't really happen + } + + outputBuffer.putSamples(inputBuffer.ptrBegin() + channels * (offset + overlapLength), (uint)temp); + + // Copies the end of the current sequence from 'inputBuffer' to + // 'midBuffer' for being mixed with the beginning of the next + // processing sequence and so on + assert((offset + temp + overlapLength * 2) <= (int)inputBuffer.numSamples()); + memcpy(pMidBuffer, inputBuffer.ptrBegin() + channels * (offset + temp + overlapLength), + channels * sizeof(SAMPLETYPE) * overlapLength); + + // Remove the processed samples from the input buffer. Update + // the difference between integer & nominal skip step to 'skipFract' + // in order to prevent the error from accumulating over time. + skipFract += nominalSkip; // real skip size + ovlSkip = (int)skipFract; // rounded to integer skip + skipFract -= ovlSkip; // maintain the fraction part, i.e. real vs. integer skip + inputBuffer.receiveSamples((uint)ovlSkip); + } +} + + +// Adds 'numsamples' pcs of samples from the 'samples' memory position into +// the input of the object. +void TDStretch::putSamples(const SAMPLETYPE *samples, uint nSamples) +{ + // Add the samples into the input buffer + inputBuffer.putSamples(samples, nSamples); + // Process the samples in input buffer + processSamples(); +} + + + +/// Set new overlap length parameter & reallocate RefMidBuffer if necessary. +void TDStretch::acceptNewOverlapLength(int newOverlapLength) +{ + int prevOvl; + + assert(newOverlapLength >= 0); + prevOvl = overlapLength; + overlapLength = newOverlapLength; + + if (overlapLength > prevOvl) + { + delete[] pMidBuffer; + delete[] pRefMidBufferUnaligned; + + pMidBuffer = new SAMPLETYPE[overlapLength * 2]; + clearMidBuffer(); + + pRefMidBufferUnaligned = new SAMPLETYPE[2 * overlapLength + 16 / sizeof(SAMPLETYPE)]; + // ensure that 'pRefMidBuffer' is aligned to 16 byte boundary for efficiency + pRefMidBuffer = (SAMPLETYPE *)((((ulong)pRefMidBufferUnaligned) + 15) & (ulong)-16); + } +} + + +// Operator 'new' is overloaded so that it automatically creates a suitable instance +// depending on if we've a MMX/SSE/etc-capable CPU available or not. +void * TDStretch::operator new(size_t s) +{ + // Notice! don't use "new TDStretch" directly, use "newInstance" to create a new instance instead! + throw std::runtime_error("Error in TDStretch::new: Don't use 'new TDStretch' directly, use 'newInstance' member instead!"); + return NULL; +} + + +TDStretch * TDStretch::newInstance() +{ + uint uExtensions; + + uExtensions = detectCPUextensions(); + + // Check if MMX/SSE/3DNow! instruction set extensions supported by CPU + +#ifdef ALLOW_MMX + // MMX routines available only with integer sample types + if (uExtensions & SUPPORT_MMX) + { + return ::new TDStretchMMX; + } + else +#endif // ALLOW_MMX + + +#ifdef ALLOW_SSE + if (uExtensions & SUPPORT_SSE) + { + // SSE support + return ::new TDStretchSSE; + } + else +#endif // ALLOW_SSE + + +#ifdef ALLOW_3DNOW + if (uExtensions & SUPPORT_3DNOW) + { + // 3DNow! support + return ::new TDStretch3DNow; + } + else +#endif // ALLOW_3DNOW + + { + // ISA optimizations not supported, use plain C version + return ::new TDStretch; + } +} + + +////////////////////////////////////////////////////////////////////////////// +// +// Integer arithmetics specific algorithm implementations. +// +////////////////////////////////////////////////////////////////////////////// + +#ifdef INTEGER_SAMPLES + +// Slopes the amplitude of the 'midBuffer' samples so that cross correlation +// is faster to calculate +void TDStretch::precalcCorrReferenceStereo() +{ + int i, cnt2; + int temp, temp2; + + for (i=0 ; i < (int)overlapLength ;i ++) + { + temp = i * (overlapLength - i); + cnt2 = i * 2; + + temp2 = (pMidBuffer[cnt2] * temp) / slopingDivider; + pRefMidBuffer[cnt2] = (short)(temp2); + temp2 = (pMidBuffer[cnt2 + 1] * temp) / slopingDivider; + pRefMidBuffer[cnt2 + 1] = (short)(temp2); + } +} + + +// Slopes the amplitude of the 'midBuffer' samples so that cross correlation +// is faster to calculate +void TDStretch::precalcCorrReferenceMono() +{ + int i; + long temp; + long temp2; + + for (i=0 ; i < (int)overlapLength ;i ++) + { + temp = i * (overlapLength - i); + temp2 = (pMidBuffer[i] * temp) / slopingDivider; + pRefMidBuffer[i] = (short)temp2; + } +} + + +// Overlaps samples in 'midBuffer' with the samples in 'input'. The 'Stereo' +// version of the routine. +void TDStretch::overlapStereo(short *poutput, const short *input) const +{ + int i; + short temp; + int cnt2; + + for (i = 0; i < overlapLength ; i ++) + { + temp = (short)(overlapLength - i); + cnt2 = 2 * i; + poutput[cnt2] = (input[cnt2] * i + pMidBuffer[cnt2] * temp ) / overlapLength; + poutput[cnt2 + 1] = (input[cnt2 + 1] * i + pMidBuffer[cnt2 + 1] * temp ) / overlapLength; + } +} + +// Calculates the x having the closest 2^x value for the given value +static int _getClosest2Power(double value) +{ + return (int)(log(value) / log(2.0) + 0.5); +} + + +/// Calculates overlap period length in samples. +/// Integer version rounds overlap length to closest power of 2 +/// for a divide scaling operation. +void TDStretch::calculateOverlapLength(int aoverlapMs) +{ + int newOvl; + + assert(aoverlapMs >= 0); + + // calculate overlap length so that it's power of 2 - thus it's easy to do + // integer division by right-shifting. Term "-1" at end is to account for + // the extra most significatnt bit left unused in result by signed multiplication + overlapDividerBits = _getClosest2Power((sampleRate * aoverlapMs) / 1000.0) - 1; + if (overlapDividerBits > 9) overlapDividerBits = 9; + if (overlapDividerBits < 3) overlapDividerBits = 3; + newOvl = (int)pow(2.0, (int)overlapDividerBits + 1); // +1 => account for -1 above + + acceptNewOverlapLength(newOvl); + + // calculate sloping divider so that crosscorrelation operation won't + // overflow 32-bit register. Max. sum of the crosscorrelation sum without + // divider would be 2^30*(N^3-N)/3, where N = overlap length + slopingDivider = (newOvl * newOvl - 1) / 3; +} + + +long TDStretch::calcCrossCorrMono(const short *mixingPos, const short *compare) const +{ + long corr; + long norm; + int i; + + corr = norm = 0; + for (i = 1; i < overlapLength; i ++) + { + corr += (mixingPos[i] * compare[i]) >> overlapDividerBits; + norm += (mixingPos[i] * mixingPos[i]) >> overlapDividerBits; + } + + // Normalize result by dividing by sqrt(norm) - this step is easiest + // done using floating point operation + if (norm == 0) norm = 1; // to avoid div by zero + return (long)((double)corr * SHRT_MAX / sqrt((double)norm)); +} + + +long TDStretch::calcCrossCorrStereo(const short *mixingPos, const short *compare) const +{ + long corr; + long norm; + int i; + + corr = norm = 0; + for (i = 2; i < 2 * overlapLength; i += 2) + { + corr += (mixingPos[i] * compare[i] + + mixingPos[i + 1] * compare[i + 1]) >> overlapDividerBits; + norm += (mixingPos[i] * mixingPos[i] + mixingPos[i + 1] * mixingPos[i + 1]) >> overlapDividerBits; + } + + // Normalize result by dividing by sqrt(norm) - this step is easiest + // done using floating point operation + if (norm == 0) norm = 1; // to avoid div by zero + return (long)((double)corr * SHRT_MAX / sqrt((double)norm)); +} + +#endif // INTEGER_SAMPLES + +////////////////////////////////////////////////////////////////////////////// +// +// Floating point arithmetics specific algorithm implementations. +// + +#ifdef FLOAT_SAMPLES + + +// Slopes the amplitude of the 'midBuffer' samples so that cross correlation +// is faster to calculate +void TDStretch::precalcCorrReferenceStereo() +{ + int i, cnt2; + float temp; + + for (i=0 ; i < (int)overlapLength ;i ++) + { + temp = (float)i * (float)(overlapLength - i); + cnt2 = i * 2; + pRefMidBuffer[cnt2] = (float)(pMidBuffer[cnt2] * temp); + pRefMidBuffer[cnt2 + 1] = (float)(pMidBuffer[cnt2 + 1] * temp); + } +} + + +// Slopes the amplitude of the 'midBuffer' samples so that cross correlation +// is faster to calculate +void TDStretch::precalcCorrReferenceMono() +{ + int i; + float temp; + + for (i=0 ; i < (int)overlapLength ;i ++) + { + temp = (float)i * (float)(overlapLength - i); + pRefMidBuffer[i] = (float)(pMidBuffer[i] * temp); + } +} + + +// Overlaps samples in 'midBuffer' with the samples in 'pInput' +void TDStretch::overlapStereo(float *pOutput, const float *pInput) const +{ + int i; + int cnt2; + float fTemp; + float fScale; + float fi; + + fScale = 1.0f / (float)overlapLength; + + for (i = 0; i < (int)overlapLength ; i ++) + { + fTemp = (float)(overlapLength - i) * fScale; + fi = (float)i * fScale; + cnt2 = 2 * i; + pOutput[cnt2 + 0] = pInput[cnt2 + 0] * fi + pMidBuffer[cnt2 + 0] * fTemp; + pOutput[cnt2 + 1] = pInput[cnt2 + 1] * fi + pMidBuffer[cnt2 + 1] * fTemp; + } +} + + +/// Calculates overlapInMsec period length in samples. +void TDStretch::calculateOverlapLength(int overlapInMsec) +{ + int newOvl; + + assert(overlapInMsec >= 0); + newOvl = (sampleRate * overlapInMsec) / 1000; + if (newOvl < 16) newOvl = 16; + + // must be divisible by 8 + newOvl -= newOvl % 8; + + acceptNewOverlapLength(newOvl); +} + + + +double TDStretch::calcCrossCorrMono(const float *mixingPos, const float *compare) const +{ + double corr; + double norm; + int i; + + corr = norm = 0; + for (i = 1; i < overlapLength; i ++) + { + corr += mixingPos[i] * compare[i]; + norm += mixingPos[i] * mixingPos[i]; + } + + if (norm < 1e-9) norm = 1.0; // to avoid div by zero + return corr / sqrt(norm); +} + + +double TDStretch::calcCrossCorrStereo(const float *mixingPos, const float *compare) const +{ + double corr; + double norm; + int i; + + corr = norm = 0; + for (i = 2; i < 2 * overlapLength; i += 2) + { + corr += mixingPos[i] * compare[i] + + mixingPos[i + 1] * compare[i + 1]; + norm += mixingPos[i] * mixingPos[i] + + mixingPos[i + 1] * mixingPos[i + 1]; + } + + if (norm < 1e-9) norm = 1.0; // to avoid div by zero + return corr / sqrt(norm); +} + +#endif // FLOAT_SAMPLES diff --git a/pysoundtouch/soundtouch/source/SoundTouch/TDStretch.h b/pysoundtouch/soundtouch/source/SoundTouch/TDStretch.h new file mode 100644 index 0000000..00d1f3e --- /dev/null +++ b/pysoundtouch/soundtouch/source/SoundTouch/TDStretch.h @@ -0,0 +1,275 @@ +//////////////////////////////////////////////////////////////////////////////// +/// +/// Sampled sound tempo changer/time stretch algorithm. Changes the sound tempo +/// while maintaining the original pitch by using a time domain WSOLA-like method +/// with several performance-increasing tweaks. +/// +/// Note : MMX/SSE optimized functions reside in separate, platform-specific files +/// 'mmx_optimized.cpp' and 'sse_optimized.cpp' +/// +/// Author : Copyright (c) Olli Parviainen +/// Author e-mail : oparviai 'at' iki.fi +/// SoundTouch WWW: http://www.surina.net/soundtouch +/// +//////////////////////////////////////////////////////////////////////////////// +// +// Last changed : $Date: 2009-05-17 14:35:13 +0300 (Sun, 17 May 2009) $ +// File revision : $Revision: 4 $ +// +// $Id: TDStretch.h 71 2009-05-17 11:35:13Z oparviai $ +// +//////////////////////////////////////////////////////////////////////////////// +// +// License : +// +// SoundTouch audio processing library +// Copyright (c) Olli Parviainen +// +// 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 library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +//////////////////////////////////////////////////////////////////////////////// + +#ifndef TDStretch_H +#define TDStretch_H + +#include +#include "STTypes.h" +#include "RateTransposer.h" +#include "FIFOSamplePipe.h" + +namespace soundtouch +{ + +/// Default values for sound processing parameters: +/// Notice that the default parameters are tuned for contemporary popular music +/// processing. For speech processing applications these parameters suit better: +/// #define DEFAULT_SEQUENCE_MS 40 +/// #define DEFAULT_SEEKWINDOW_MS 15 +/// #define DEFAULT_OVERLAP_MS 8 +/// + +/// Default length of a single processing sequence, in milliseconds. This determines to how +/// long sequences the original sound is chopped in the time-stretch algorithm. +/// +/// The larger this value is, the lesser sequences are used in processing. In principle +/// a bigger value sounds better when slowing down tempo, but worse when increasing tempo +/// and vice versa. +/// +/// Increasing this value reduces computational burden & vice versa. +//#define DEFAULT_SEQUENCE_MS 40 +#define DEFAULT_SEQUENCE_MS USE_AUTO_SEQUENCE_LEN + +/// Giving this value for the sequence length sets automatic parameter value +/// according to tempo setting (recommended) +#define USE_AUTO_SEQUENCE_LEN 0 + +/// Seeking window default length in milliseconds for algorithm that finds the best possible +/// overlapping location. This determines from how wide window the algorithm may look for an +/// optimal joining location when mixing the sound sequences back together. +/// +/// The bigger this window setting is, the higher the possibility to find a better mixing +/// position will become, but at the same time large values may cause a "drifting" artifact +/// because consequent sequences will be taken at more uneven intervals. +/// +/// If there's a disturbing artifact that sounds as if a constant frequency was drifting +/// around, try reducing this setting. +/// +/// Increasing this value increases computational burden & vice versa. +//#define DEFAULT_SEEKWINDOW_MS 15 +#define DEFAULT_SEEKWINDOW_MS USE_AUTO_SEEKWINDOW_LEN + +/// Giving this value for the seek window length sets automatic parameter value +/// according to tempo setting (recommended) +#define USE_AUTO_SEEKWINDOW_LEN 0 + +/// Overlap length in milliseconds. When the chopped sound sequences are mixed back together, +/// to form a continuous sound stream, this parameter defines over how long period the two +/// consecutive sequences are let to overlap each other. +/// +/// This shouldn't be that critical parameter. If you reduce the DEFAULT_SEQUENCE_MS setting +/// by a large amount, you might wish to try a smaller value on this. +/// +/// Increasing this value increases computational burden & vice versa. +#define DEFAULT_OVERLAP_MS 8 + + +/// Class that does the time-stretch (tempo change) effect for the processed +/// sound. +class TDStretch : public FIFOProcessor +{ +protected: + int channels; + int sampleReq; + float tempo; + + SAMPLETYPE *pMidBuffer; + SAMPLETYPE *pRefMidBuffer; + SAMPLETYPE *pRefMidBufferUnaligned; + int overlapLength; + int seekLength; + int seekWindowLength; + int overlapDividerBits; + int slopingDivider; + float nominalSkip; + float skipFract; + FIFOSampleBuffer outputBuffer; + FIFOSampleBuffer inputBuffer; + BOOL bQuickSeek; +// int outDebt; +// BOOL bMidBufferDirty; + + int sampleRate; + int sequenceMs; + int seekWindowMs; + int overlapMs; + BOOL bAutoSeqSetting; + BOOL bAutoSeekSetting; + + void acceptNewOverlapLength(int newOverlapLength); + + virtual void clearCrossCorrState(); + void calculateOverlapLength(int overlapMs); + + virtual LONG_SAMPLETYPE calcCrossCorrStereo(const SAMPLETYPE *mixingPos, const SAMPLETYPE *compare) const; + virtual LONG_SAMPLETYPE calcCrossCorrMono(const SAMPLETYPE *mixingPos, const SAMPLETYPE *compare) const; + + virtual int seekBestOverlapPositionStereo(const SAMPLETYPE *refPos); + virtual int seekBestOverlapPositionStereoQuick(const SAMPLETYPE *refPos); + virtual int seekBestOverlapPositionMono(const SAMPLETYPE *refPos); + virtual int seekBestOverlapPositionMonoQuick(const SAMPLETYPE *refPos); + int seekBestOverlapPosition(const SAMPLETYPE *refPos); + + virtual void overlapStereo(SAMPLETYPE *output, const SAMPLETYPE *input) const; + virtual void overlapMono(SAMPLETYPE *output, const SAMPLETYPE *input) const; + + void clearMidBuffer(); + void overlap(SAMPLETYPE *output, const SAMPLETYPE *input, uint ovlPos) const; + + void precalcCorrReferenceMono(); + void precalcCorrReferenceStereo(); + + void calcSeqParameters(); + + /// Changes the tempo of the given sound samples. + /// Returns amount of samples returned in the "output" buffer. + /// The maximum amount of samples that can be returned at a time is set by + /// the 'set_returnBuffer_size' function. + void processSamples(); + +public: + TDStretch(); + virtual ~TDStretch(); + + /// Operator 'new' is overloaded so that it automatically creates a suitable instance + /// depending on if we've a MMX/SSE/etc-capable CPU available or not. + static void *operator new(size_t s); + + /// Use this function instead of "new" operator to create a new instance of this class. + /// This function automatically chooses a correct feature set depending on if the CPU + /// supports MMX/SSE/etc extensions. + static TDStretch *newInstance(); + + /// Returns the output buffer object + FIFOSamplePipe *getOutput() { return &outputBuffer; }; + + /// Returns the input buffer object + FIFOSamplePipe *getInput() { return &inputBuffer; }; + + /// Sets new target tempo. Normal tempo = 'SCALE', smaller values represent slower + /// tempo, larger faster tempo. + void setTempo(float newTempo); + + /// Returns nonzero if there aren't any samples available for outputting. + virtual void clear(); + + /// Clears the input buffer + void clearInput(); + + /// Sets the number of channels, 1 = mono, 2 = stereo + void setChannels(int numChannels); + + /// Enables/disables the quick position seeking algorithm. Zero to disable, + /// nonzero to enable + void enableQuickSeek(BOOL enable); + + /// Returns nonzero if the quick seeking algorithm is enabled. + BOOL isQuickSeekEnabled() const; + + /// Sets routine control parameters. These control are certain time constants + /// defining how the sound is stretched to the desired duration. + // + /// 'sampleRate' = sample rate of the sound + /// 'sequenceMS' = one processing sequence length in milliseconds + /// 'seekwindowMS' = seeking window length for scanning the best overlapping + /// position + /// 'overlapMS' = overlapping length + void setParameters(int sampleRate, ///< Samplerate of sound being processed (Hz) + int sequenceMS = -1, ///< Single processing sequence length (ms) + int seekwindowMS = -1, ///< Offset seeking window length (ms) + int overlapMS = -1 ///< Sequence overlapping length (ms) + ); + + /// Get routine control parameters, see setParameters() function. + /// Any of the parameters to this function can be NULL, in such case corresponding parameter + /// value isn't returned. + void getParameters(int *pSampleRate, int *pSequenceMs, int *pSeekWindowMs, int *pOverlapMs) const; + + /// Adds 'numsamples' pcs of samples from the 'samples' memory position into + /// the input of the object. + virtual void putSamples( + const SAMPLETYPE *samples, ///< Input sample data + uint numSamples ///< Number of samples in 'samples' so that one sample + ///< contains both channels if stereo + ); +}; + + + +// Implementation-specific class declarations: + +#ifdef ALLOW_MMX + /// Class that implements MMX optimized routines for 16bit integer samples type. + class TDStretchMMX : public TDStretch + { + protected: + long calcCrossCorrStereo(const short *mixingPos, const short *compare) const; + virtual void overlapStereo(short *output, const short *input) const; + virtual void clearCrossCorrState(); + }; +#endif /// ALLOW_MMX + + +#ifdef ALLOW_3DNOW + /// Class that implements 3DNow! optimized routines for floating point samples type. + class TDStretch3DNow : public TDStretch + { + protected: + double calcCrossCorrStereo(const float *mixingPos, const float *compare) const; + }; +#endif /// ALLOW_3DNOW + + +#ifdef ALLOW_SSE + /// Class that implements SSE optimized routines for floating point samples type. + class TDStretchSSE : public TDStretch + { + protected: + double calcCrossCorrStereo(const float *mixingPos, const float *compare) const; + }; + +#endif /// ALLOW_SSE + +} +#endif /// TDStretch_H diff --git a/pysoundtouch/soundtouch/source/SoundTouch/cpu_detect.h b/pysoundtouch/soundtouch/source/SoundTouch/cpu_detect.h new file mode 100644 index 0000000..025781d --- /dev/null +++ b/pysoundtouch/soundtouch/source/SoundTouch/cpu_detect.h @@ -0,0 +1,62 @@ +//////////////////////////////////////////////////////////////////////////////// +/// +/// A header file for detecting the Intel MMX instructions set extension. +/// +/// Please see 'mmx_win.cpp', 'mmx_cpp.cpp' and 'mmx_non_x86.cpp' for the +/// routine implementations for x86 Windows, x86 gnu version and non-x86 +/// platforms, respectively. +/// +/// Author : Copyright (c) Olli Parviainen +/// Author e-mail : oparviai 'at' iki.fi +/// SoundTouch WWW: http://www.surina.net/soundtouch +/// +//////////////////////////////////////////////////////////////////////////////// +// +// Last changed : $Date: 2008-02-10 18:26:55 +0200 (Sun, 10 Feb 2008) $ +// File revision : $Revision: 4 $ +// +// $Id: cpu_detect.h 11 2008-02-10 16:26:55Z oparviai $ +// +//////////////////////////////////////////////////////////////////////////////// +// +// License : +// +// SoundTouch audio processing library +// Copyright (c) Olli Parviainen +// +// 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 library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +//////////////////////////////////////////////////////////////////////////////// + +#ifndef _CPU_DETECT_H_ +#define _CPU_DETECT_H_ + +#include "STTypes.h" + +#define SUPPORT_MMX 0x0001 +#define SUPPORT_3DNOW 0x0002 +#define SUPPORT_ALTIVEC 0x0004 +#define SUPPORT_SSE 0x0008 +#define SUPPORT_SSE2 0x0010 + +/// Checks which instruction set extensions are supported by the CPU. +/// +/// \return A bitmask of supported extensions, see SUPPORT_... defines. +uint detectCPUextensions(void); + +/// Disables given set of instruction extensions. See SUPPORT_... defines. +void disableExtensions(uint wDisableMask); + +#endif // _CPU_DETECT_H_ diff --git a/pysoundtouch/soundtouch/source/SoundTouch/cpu_detect_x86_gcc.cpp b/pysoundtouch/soundtouch/source/SoundTouch/cpu_detect_x86_gcc.cpp new file mode 100644 index 0000000..b0d0a69 --- /dev/null +++ b/pysoundtouch/soundtouch/source/SoundTouch/cpu_detect_x86_gcc.cpp @@ -0,0 +1,135 @@ +//////////////////////////////////////////////////////////////////////////////// +/// +/// Generic version of the x86 CPU extension detection routine. +/// +/// This file is for GNU & other non-Windows compilers, see 'cpu_detect_x86_win.cpp' +/// for the Microsoft compiler version. +/// +/// Author : Copyright (c) Olli Parviainen +/// Author e-mail : oparviai 'at' iki.fi +/// SoundTouch WWW: http://www.surina.net/soundtouch +/// +//////////////////////////////////////////////////////////////////////////////// +// +// Last changed : $Date: 2009-02-25 19:13:51 +0200 (Wed, 25 Feb 2009) $ +// File revision : $Revision: 4 $ +// +// $Id: cpu_detect_x86_gcc.cpp 67 2009-02-25 17:13:51Z oparviai $ +// +//////////////////////////////////////////////////////////////////////////////// +// +// License : +// +// SoundTouch audio processing library +// Copyright (c) Olli Parviainen +// +// 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 library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +//////////////////////////////////////////////////////////////////////////////// + +#include +#include +#include "cpu_detect.h" +#include "STTypes.h" + +using namespace std; + +#include + +////////////////////////////////////////////////////////////////////////////// +// +// processor instructions extension detection routines +// +////////////////////////////////////////////////////////////////////////////// + +// Flag variable indicating whick ISA extensions are disabled (for debugging) +static uint _dwDisabledISA = 0x00; // 0xffffffff; //<- use this to disable all extensions + +// Disables given set of instruction extensions. See SUPPORT_... defines. +void disableExtensions(uint dwDisableMask) +{ + _dwDisabledISA = dwDisableMask; +} + + + +/// Checks which instruction set extensions are supported by the CPU. +uint detectCPUextensions(void) +{ +#if (!(ALLOW_X86_OPTIMIZATIONS) || !(__GNUC__)) + + return 0; // always disable extensions on non-x86 platforms. + +#else + uint res = 0; + + if (_dwDisabledISA == 0xffffffff) return 0; + + asm volatile( + "\n\txor %%esi, %%esi" // clear %%esi = result register + // check if 'cpuid' instructions is available by toggling eflags bit 21 + + "\n\tpushf" // save eflags to stack + "\n\tmovl (%%esp), %%eax" // load eax from stack (with eflags) + "\n\tmovl %%eax, %%ecx" // save the original eflags values to ecx + "\n\txor $0x00200000, %%eax" // toggle bit 21 + "\n\tmovl %%eax, (%%esp)" // store toggled eflags to stack + "\n\tpopf" // load eflags from stack + "\n\tpushf" // save updated eflags to stack + "\n\tmovl (%%esp), %%eax" // load eax from stack + "\n\tpopf" // pop stack to restore esp + "\n\txor %%edx, %%edx" // clear edx for defaulting no mmx + "\n\tcmp %%ecx, %%eax" // compare to original eflags values + "\n\tjz end" // jumps to 'end' if cpuid not present + // cpuid instruction available, test for presence of mmx instructions + + "\n\tmovl $1, %%eax" + "\n\tcpuid" + "\n\ttest $0x00800000, %%edx" + "\n\tjz end" // branch if MMX not available + + "\n\tor $0x01, %%esi" // otherwise add MMX support bit + + "\n\ttest $0x02000000, %%edx" + "\n\tjz test3DNow" // branch if SSE not available + + "\n\tor $0x08, %%esi" // otherwise add SSE support bit + + "\n\ttest3DNow:" + // test for precense of AMD extensions + "\n\tmov $0x80000000, %%eax" + "\n\tcpuid" + "\n\tcmp $0x80000000, %%eax" + "\n\tjbe end" // branch if no AMD extensions detected + + // test for precense of 3DNow! extension + "\n\tmov $0x80000001, %%eax" + "\n\tcpuid" + "\n\ttest $0x80000000, %%edx" + "\n\tjz end" // branch if 3DNow! not detected + + "\n\tor $0x02, %%esi" // otherwise add 3DNow support bit + + "\n\tend:" + + "\n\tmov %%esi, %0" + + : "=r" (res) + : /* no inputs */ + : "%edx", "%eax", "%ecx", "%esi" ); + + return res & ~_dwDisabledISA; +#endif +} diff --git a/pysoundtouch/soundtouch/source/SoundTouch/cpu_detect_x86_win.cpp b/pysoundtouch/soundtouch/source/SoundTouch/cpu_detect_x86_win.cpp new file mode 100644 index 0000000..c6c5424 --- /dev/null +++ b/pysoundtouch/soundtouch/source/SoundTouch/cpu_detect_x86_win.cpp @@ -0,0 +1,129 @@ +//////////////////////////////////////////////////////////////////////////////// +/// +/// Win32 version of the x86 CPU detect routine. +/// +/// This file is to be compiled in Windows platform with Microsoft Visual C++ +/// Compiler. Please see 'cpu_detect_x86_gcc.cpp' for the gcc compiler version +/// for all GNU platforms. +/// +/// Author : Copyright (c) Olli Parviainen +/// Author e-mail : oparviai 'at' iki.fi +/// SoundTouch WWW: http://www.surina.net/soundtouch +/// +//////////////////////////////////////////////////////////////////////////////// +// +// Last changed : $Date: 2009-02-13 18:22:48 +0200 (Fri, 13 Feb 2009) $ +// File revision : $Revision: 4 $ +// +// $Id: cpu_detect_x86_win.cpp 62 2009-02-13 16:22:48Z oparviai $ +// +//////////////////////////////////////////////////////////////////////////////// +// +// License : +// +// SoundTouch audio processing library +// Copyright (c) Olli Parviainen +// +// 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 library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +//////////////////////////////////////////////////////////////////////////////// + +#include "cpu_detect.h" + +#ifndef WIN32 +#error wrong platform - this source code file is exclusively for Win32 platform +#endif + +////////////////////////////////////////////////////////////////////////////// +// +// processor instructions extension detection routines +// +////////////////////////////////////////////////////////////////////////////// + +// Flag variable indicating whick ISA extensions are disabled (for debugging) +static uint _dwDisabledISA = 0x00; // 0xffffffff; //<- use this to disable all extensions + + +// Disables given set of instruction extensions. See SUPPORT_... defines. +void disableExtensions(uint dwDisableMask) +{ + _dwDisabledISA = dwDisableMask; +} + + + +/// Checks which instruction set extensions are supported by the CPU. +uint detectCPUextensions(void) +{ + uint res = 0; + + if (_dwDisabledISA == 0xffffffff) return 0; + + _asm + { + ; check if 'cpuid' instructions is available by toggling eflags bit 21 + ; + xor esi, esi ; clear esi = result register + + pushfd ; save eflags to stack + mov eax,dword ptr [esp] ; load eax from stack (with eflags) + mov ecx, eax ; save the original eflags values to ecx + xor eax, 0x00200000 ; toggle bit 21 + mov dword ptr [esp],eax ; store toggled eflags to stack + popfd ; load eflags from stack + + pushfd ; save updated eflags to stack + mov eax,dword ptr [esp] ; load eax from stack + popfd ; pop stack to restore stack pointer + + xor edx, edx ; clear edx for defaulting no mmx + cmp eax, ecx ; compare to original eflags values + jz end ; jumps to 'end' if cpuid not present + + ; cpuid instruction available, test for presence of mmx instructions + mov eax, 1 + cpuid + test edx, 0x00800000 + jz end ; branch if MMX not available + + or esi, SUPPORT_MMX ; otherwise add MMX support bit + + test edx, 0x02000000 + jz test3DNow ; branch if SSE not available + + or esi, SUPPORT_SSE ; otherwise add SSE support bit + + test3DNow: + ; test for precense of AMD extensions + mov eax, 0x80000000 + cpuid + cmp eax, 0x80000000 + jbe end ; branch if no AMD extensions detected + + ; test for precense of 3DNow! extension + mov eax, 0x80000001 + cpuid + test edx, 0x80000000 + jz end ; branch if 3DNow! not detected + + or esi, SUPPORT_3DNOW ; otherwise add 3DNow support bit + + end: + + mov res, esi + } + + return res & ~_dwDisabledISA; +} diff --git a/pysoundtouch/soundtouch/source/SoundTouch/mmx_optimized.cpp b/pysoundtouch/soundtouch/source/SoundTouch/mmx_optimized.cpp new file mode 100644 index 0000000..539ee57 --- /dev/null +++ b/pysoundtouch/soundtouch/source/SoundTouch/mmx_optimized.cpp @@ -0,0 +1,320 @@ +//////////////////////////////////////////////////////////////////////////////// +/// +/// MMX optimized routines. All MMX optimized functions have been gathered into +/// this single source code file, regardless to their class or original source +/// code file, in order to ease porting the library to other compiler and +/// processor platforms. +/// +/// The MMX-optimizations are programmed using MMX compiler intrinsics that +/// are supported both by Microsoft Visual C++ and GCC compilers, so this file +/// should compile with both toolsets. +/// +/// NOTICE: If using Visual Studio 6.0, you'll need to install the "Visual C++ +/// 6.0 processor pack" update to support compiler intrinsic syntax. The update +/// is available for download at Microsoft Developers Network, see here: +/// http://msdn.microsoft.com/en-us/vstudio/aa718349.aspx +/// +/// Author : Copyright (c) Olli Parviainen +/// Author e-mail : oparviai 'at' iki.fi +/// SoundTouch WWW: http://www.surina.net/soundtouch +/// +//////////////////////////////////////////////////////////////////////////////// +// +// Last changed : $Date: 2009-10-31 16:53:23 +0200 (Sat, 31 Oct 2009) $ +// File revision : $Revision: 4 $ +// +// $Id: mmx_optimized.cpp 75 2009-10-31 14:53:23Z oparviai $ +// +//////////////////////////////////////////////////////////////////////////////// +// +// License : +// +// SoundTouch audio processing library +// Copyright (c) Olli Parviainen +// +// 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 library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +//////////////////////////////////////////////////////////////////////////////// + +#include "STTypes.h" + +#ifdef ALLOW_MMX +// MMX routines available only with integer sample type + +#if !(WIN32 || __i386__ || __x86_64__) +#error "wrong platform - this source code file is exclusively for x86 platforms" +#endif + +using namespace soundtouch; + +////////////////////////////////////////////////////////////////////////////// +// +// implementation of MMX optimized functions of class 'TDStretchMMX' +// +////////////////////////////////////////////////////////////////////////////// + +#include "TDStretch.h" +#include +#include +#include + + +// Calculates cross correlation of two buffers +long TDStretchMMX::calcCrossCorrStereo(const short *pV1, const short *pV2) const +{ + const __m64 *pVec1, *pVec2; + __m64 shifter; + __m64 accu, normaccu; + long corr, norm; + int i; + + pVec1 = (__m64*)pV1; + pVec2 = (__m64*)pV2; + + shifter = _m_from_int(overlapDividerBits); + normaccu = accu = _mm_setzero_si64(); + + // Process 4 parallel sets of 2 * stereo samples each during each + // round to improve CPU-level parallellization. + for (i = 0; i < overlapLength / 8; i ++) + { + __m64 temp, temp2; + + // dictionary of instructions: + // _m_pmaddwd : 4*16bit multiply-add, resulting two 32bits = [a0*b0+a1*b1 ; a2*b2+a3*b3] + // _mm_add_pi32 : 2*32bit add + // _m_psrad : 32bit right-shift + + temp = _mm_add_pi32(_mm_madd_pi16(pVec1[0], pVec2[0]), + _mm_madd_pi16(pVec1[1], pVec2[1])); + temp2 = _mm_add_pi32(_mm_madd_pi16(pVec1[0], pVec1[0]), + _mm_madd_pi16(pVec1[1], pVec1[1])); + accu = _mm_add_pi32(accu, _mm_sra_pi32(temp, shifter)); + normaccu = _mm_add_pi32(normaccu, _mm_sra_pi32(temp2, shifter)); + + temp = _mm_add_pi32(_mm_madd_pi16(pVec1[2], pVec2[2]), + _mm_madd_pi16(pVec1[3], pVec2[3])); + temp2 = _mm_add_pi32(_mm_madd_pi16(pVec1[2], pVec1[2]), + _mm_madd_pi16(pVec1[3], pVec1[3])); + accu = _mm_add_pi32(accu, _mm_sra_pi32(temp, shifter)); + normaccu = _mm_add_pi32(normaccu, _mm_sra_pi32(temp2, shifter)); + + pVec1 += 4; + pVec2 += 4; + } + + // copy hi-dword of mm0 to lo-dword of mm1, then sum mmo+mm1 + // and finally store the result into the variable "corr" + + accu = _mm_add_pi32(accu, _mm_srli_si64(accu, 32)); + corr = _m_to_int(accu); + + normaccu = _mm_add_pi32(normaccu, _mm_srli_si64(normaccu, 32)); + norm = _m_to_int(normaccu); + + // Clear MMS state + _m_empty(); + + // Normalize result by dividing by sqrt(norm) - this step is easiest + // done using floating point operation + if (norm == 0) norm = 1; // to avoid div by zero + return (long)((double)corr * USHRT_MAX / sqrt((double)norm)); + // Note: Warning about the missing EMMS instruction is harmless + // as it'll be called elsewhere. +} + + + +void TDStretchMMX::clearCrossCorrState() +{ + // Clear MMS state + _m_empty(); + //_asm EMMS; +} + + + +// MMX-optimized version of the function overlapStereo +void TDStretchMMX::overlapStereo(short *output, const short *input) const +{ + const __m64 *pVinput, *pVMidBuf; + __m64 *pVdest; + __m64 mix1, mix2, adder, shifter; + int i; + + pVinput = (const __m64*)input; + pVMidBuf = (const __m64*)pMidBuffer; + pVdest = (__m64*)output; + + // mix1 = mixer values for 1st stereo sample + // mix1 = mixer values for 2nd stereo sample + // adder = adder for updating mixer values after each round + + mix1 = _mm_set_pi16(0, overlapLength, 0, overlapLength); + adder = _mm_set_pi16(1, -1, 1, -1); + mix2 = _mm_add_pi16(mix1, adder); + adder = _mm_add_pi16(adder, adder); + + // Overlaplength-division by shifter. "+1" is to account for "-1" deduced in + // overlapDividerBits calculation earlier. + shifter = _m_from_int(overlapDividerBits + 1); + + for (i = 0; i < overlapLength / 4; i ++) + { + __m64 temp1, temp2; + + // load & shuffle data so that input & mixbuffer data samples are paired + temp1 = _mm_unpacklo_pi16(pVMidBuf[0], pVinput[0]); // = i0l m0l i0r m0r + temp2 = _mm_unpackhi_pi16(pVMidBuf[0], pVinput[0]); // = i1l m1l i1r m1r + + // temp = (temp .* mix) >> shifter + temp1 = _mm_sra_pi32(_mm_madd_pi16(temp1, mix1), shifter); + temp2 = _mm_sra_pi32(_mm_madd_pi16(temp2, mix2), shifter); + pVdest[0] = _mm_packs_pi32(temp1, temp2); // pack 2*2*32bit => 4*16bit + + // update mix += adder + mix1 = _mm_add_pi16(mix1, adder); + mix2 = _mm_add_pi16(mix2, adder); + + // --- second round begins here --- + + // load & shuffle data so that input & mixbuffer data samples are paired + temp1 = _mm_unpacklo_pi16(pVMidBuf[1], pVinput[1]); // = i2l m2l i2r m2r + temp2 = _mm_unpackhi_pi16(pVMidBuf[1], pVinput[1]); // = i3l m3l i3r m3r + + // temp = (temp .* mix) >> shifter + temp1 = _mm_sra_pi32(_mm_madd_pi16(temp1, mix1), shifter); + temp2 = _mm_sra_pi32(_mm_madd_pi16(temp2, mix2), shifter); + pVdest[1] = _mm_packs_pi32(temp1, temp2); // pack 2*2*32bit => 4*16bit + + // update mix += adder + mix1 = _mm_add_pi16(mix1, adder); + mix2 = _mm_add_pi16(mix2, adder); + + pVinput += 2; + pVMidBuf += 2; + pVdest += 2; + } + + _m_empty(); // clear MMS state +} + + +////////////////////////////////////////////////////////////////////////////// +// +// implementation of MMX optimized functions of class 'FIRFilter' +// +////////////////////////////////////////////////////////////////////////////// + +#include "FIRFilter.h" + + +FIRFilterMMX::FIRFilterMMX() : FIRFilter() +{ + filterCoeffsUnalign = NULL; +} + + +FIRFilterMMX::~FIRFilterMMX() +{ + delete[] filterCoeffsUnalign; +} + + +// (overloaded) Calculates filter coefficients for MMX routine +void FIRFilterMMX::setCoefficients(const short *coeffs, uint newLength, uint uResultDivFactor) +{ + uint i; + FIRFilter::setCoefficients(coeffs, newLength, uResultDivFactor); + + // Ensure that filter coeffs array is aligned to 16-byte boundary + delete[] filterCoeffsUnalign; + filterCoeffsUnalign = new short[2 * newLength + 8]; + filterCoeffsAlign = (short *)(((ulong)filterCoeffsUnalign + 15) & -16); + + // rearrange the filter coefficients for mmx routines + for (i = 0;i < length; i += 4) + { + filterCoeffsAlign[2 * i + 0] = coeffs[i + 0]; + filterCoeffsAlign[2 * i + 1] = coeffs[i + 2]; + filterCoeffsAlign[2 * i + 2] = coeffs[i + 0]; + filterCoeffsAlign[2 * i + 3] = coeffs[i + 2]; + + filterCoeffsAlign[2 * i + 4] = coeffs[i + 1]; + filterCoeffsAlign[2 * i + 5] = coeffs[i + 3]; + filterCoeffsAlign[2 * i + 6] = coeffs[i + 1]; + filterCoeffsAlign[2 * i + 7] = coeffs[i + 3]; + } +} + + + +// mmx-optimized version of the filter routine for stereo sound +uint FIRFilterMMX::evaluateFilterStereo(short *dest, const short *src, uint numSamples) const +{ + // Create stack copies of the needed member variables for asm routines : + uint i, j; + __m64 *pVdest = (__m64*)dest; + + if (length < 2) return 0; + + for (i = 0; i < (numSamples - length) / 2; i ++) + { + __m64 accu1; + __m64 accu2; + const __m64 *pVsrc = (const __m64*)src; + const __m64 *pVfilter = (const __m64*)filterCoeffsAlign; + + accu1 = accu2 = _mm_setzero_si64(); + for (j = 0; j < lengthDiv8 * 2; j ++) + { + __m64 temp1, temp2; + + temp1 = _mm_unpacklo_pi16(pVsrc[0], pVsrc[1]); // = l2 l0 r2 r0 + temp2 = _mm_unpackhi_pi16(pVsrc[0], pVsrc[1]); // = l3 l1 r3 r1 + + accu1 = _mm_add_pi32(accu1, _mm_madd_pi16(temp1, pVfilter[0])); // += l2*f2+l0*f0 r2*f2+r0*f0 + accu1 = _mm_add_pi32(accu1, _mm_madd_pi16(temp2, pVfilter[1])); // += l3*f3+l1*f1 r3*f3+r1*f1 + + temp1 = _mm_unpacklo_pi16(pVsrc[1], pVsrc[2]); // = l4 l2 r4 r2 + + accu2 = _mm_add_pi32(accu2, _mm_madd_pi16(temp2, pVfilter[0])); // += l3*f2+l1*f0 r3*f2+r1*f0 + accu2 = _mm_add_pi32(accu2, _mm_madd_pi16(temp1, pVfilter[1])); // += l4*f3+l2*f1 r4*f3+r2*f1 + + // accu1 += l2*f2+l0*f0 r2*f2+r0*f0 + // += l3*f3+l1*f1 r3*f3+r1*f1 + + // accu2 += l3*f2+l1*f0 r3*f2+r1*f0 + // l4*f3+l2*f1 r4*f3+r2*f1 + + pVfilter += 2; + pVsrc += 2; + } + // accu >>= resultDivFactor + accu1 = _mm_srai_pi32(accu1, resultDivFactor); + accu2 = _mm_srai_pi32(accu2, resultDivFactor); + + // pack 2*2*32bits => 4*16 bits + pVdest[0] = _mm_packs_pi32(accu1, accu2); + src += 4; + pVdest ++; + } + + _m_empty(); // clear emms state + + return (numSamples & 0xfffffffe) - length; +} + +#endif // ALLOW_MMX diff --git a/pysoundtouch/soundtouch/source/SoundTouch/sse_optimized.cpp b/pysoundtouch/soundtouch/source/SoundTouch/sse_optimized.cpp new file mode 100644 index 0000000..7659be6 --- /dev/null +++ b/pysoundtouch/soundtouch/source/SoundTouch/sse_optimized.cpp @@ -0,0 +1,510 @@ +//////////////////////////////////////////////////////////////////////////////// +/// +/// SSE optimized routines for Pentium-III, Athlon-XP and later CPUs. All SSE +/// optimized functions have been gathered into this single source +/// code file, regardless to their class or original source code file, in order +/// to ease porting the library to other compiler and processor platforms. +/// +/// The SSE-optimizations are programmed using SSE compiler intrinsics that +/// are supported both by Microsoft Visual C++ and GCC compilers, so this file +/// should compile with both toolsets. +/// +/// NOTICE: If using Visual Studio 6.0, you'll need to install the "Visual C++ +/// 6.0 processor pack" update to support SSE instruction set. The update is +/// available for download at Microsoft Developers Network, see here: +/// http://msdn.microsoft.com/en-us/vstudio/aa718349.aspx +/// +/// If the above URL is expired or removed, go to "http://msdn.microsoft.com" and +/// perform a search with keywords "processor pack". +/// +/// Author : Copyright (c) Olli Parviainen +/// Author e-mail : oparviai 'at' iki.fi +/// SoundTouch WWW: http://www.surina.net/soundtouch +/// +//////////////////////////////////////////////////////////////////////////////// +// +// Last changed : $Date: 2009-12-28 22:32:57 +0200 (Mon, 28 Dec 2009) $ +// File revision : $Revision: 4 $ +// +// $Id: sse_optimized.cpp 80 2009-12-28 20:32:57Z oparviai $ +// +//////////////////////////////////////////////////////////////////////////////// +// +// License : +// +// SoundTouch audio processing library +// Copyright (c) Olli Parviainen +// +// 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 library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +//////////////////////////////////////////////////////////////////////////////// + +#include "cpu_detect.h" +#include "STTypes.h" + +using namespace soundtouch; + +#ifdef ALLOW_SSE + +// SSE routines available only with float sample type + +////////////////////////////////////////////////////////////////////////////// +// +// implementation of SSE optimized functions of class 'TDStretchSSE' +// +////////////////////////////////////////////////////////////////////////////// + +#include "TDStretch.h" +#include +#include + +// Calculates cross correlation of two buffers +double TDStretchSSE::calcCrossCorrStereo(const float *pV1, const float *pV2) const +{ + int i; + const float *pVec1; + const __m128 *pVec2; + __m128 vSum, vNorm; + + // Note. It means a major slow-down if the routine needs to tolerate + // unaligned __m128 memory accesses. It's way faster if we can skip + // unaligned slots and use _mm_load_ps instruction instead of _mm_loadu_ps. + // This can mean up to ~ 10-fold difference (incl. part of which is + // due to skipping every second round for stereo sound though). + // + // Compile-time define ALLOW_NONEXACT_SIMD_OPTIMIZATION is provided + // for choosing if this little cheating is allowed. + +#ifdef ALLOW_NONEXACT_SIMD_OPTIMIZATION + // Little cheating allowed, return valid correlation only for + // aligned locations, meaning every second round for stereo sound. + + #define _MM_LOAD _mm_load_ps + + if (((ulong)pV1) & 15) return -1e50; // skip unaligned locations + +#else + // No cheating allowed, use unaligned load & take the resulting + // performance hit. + #define _MM_LOAD _mm_loadu_ps +#endif + + // ensure overlapLength is divisible by 8 + assert((overlapLength % 8) == 0); + + // Calculates the cross-correlation value between 'pV1' and 'pV2' vectors + // Note: pV2 _must_ be aligned to 16-bit boundary, pV1 need not. + pVec1 = (const float*)pV1; + pVec2 = (const __m128*)pV2; + vSum = vNorm = _mm_setzero_ps(); + + // Unroll the loop by factor of 4 * 4 operations + for (i = 0; i < overlapLength / 8; i ++) + { + __m128 vTemp; + // vSum += pV1[0..3] * pV2[0..3] + vTemp = _MM_LOAD(pVec1); + vSum = _mm_add_ps(vSum, _mm_mul_ps(vTemp ,pVec2[0])); + vNorm = _mm_add_ps(vNorm, _mm_mul_ps(vTemp ,vTemp)); + + // vSum += pV1[4..7] * pV2[4..7] + vTemp = _MM_LOAD(pVec1 + 4); + vSum = _mm_add_ps(vSum, _mm_mul_ps(vTemp, pVec2[1])); + vNorm = _mm_add_ps(vNorm, _mm_mul_ps(vTemp ,vTemp)); + + // vSum += pV1[8..11] * pV2[8..11] + vTemp = _MM_LOAD(pVec1 + 8); + vSum = _mm_add_ps(vSum, _mm_mul_ps(vTemp, pVec2[2])); + vNorm = _mm_add_ps(vNorm, _mm_mul_ps(vTemp ,vTemp)); + + // vSum += pV1[12..15] * pV2[12..15] + vTemp = _MM_LOAD(pVec1 + 12); + vSum = _mm_add_ps(vSum, _mm_mul_ps(vTemp, pVec2[3])); + vNorm = _mm_add_ps(vNorm, _mm_mul_ps(vTemp ,vTemp)); + + pVec1 += 16; + pVec2 += 4; + } + + // return value = vSum[0] + vSum[1] + vSum[2] + vSum[3] + float *pvNorm = (float*)&vNorm; + double norm = sqrt(pvNorm[0] + pvNorm[1] + pvNorm[2] + pvNorm[3]); + if (norm < 1e-9) norm = 1.0; // to avoid div by zero + + float *pvSum = (float*)&vSum; + return (double)(pvSum[0] + pvSum[1] + pvSum[2] + pvSum[3]) / norm; + + /* This is approximately corresponding routine in C-language yet without normalization: + double corr, norm; + uint i; + + // Calculates the cross-correlation value between 'pV1' and 'pV2' vectors + corr = norm = 0.0; + for (i = 0; i < overlapLength / 8; i ++) + { + corr += pV1[0] * pV2[0] + + pV1[1] * pV2[1] + + pV1[2] * pV2[2] + + pV1[3] * pV2[3] + + pV1[4] * pV2[4] + + pV1[5] * pV2[5] + + pV1[6] * pV2[6] + + pV1[7] * pV2[7] + + pV1[8] * pV2[8] + + pV1[9] * pV2[9] + + pV1[10] * pV2[10] + + pV1[11] * pV2[11] + + pV1[12] * pV2[12] + + pV1[13] * pV2[13] + + pV1[14] * pV2[14] + + pV1[15] * pV2[15]; + + for (j = 0; j < 15; j ++) norm += pV1[j] * pV1[j]; + + pV1 += 16; + pV2 += 16; + } + return corr / sqrt(norm); + */ + + /* This is a bit outdated, corresponding routine in assembler. This may be teeny-weeny bit + faster than intrinsic version, but more difficult to maintain & get compiled on multiple + platforms. + + uint overlapLengthLocal = overlapLength; + float corr; + + _asm + { + // Very important note: data in 'pV2' _must_ be aligned to + // 16-byte boundary! + + // give prefetch hints to CPU of what data are to be needed soonish + // give more aggressive hints on pV1 as that changes while pV2 stays + // same between runs + prefetcht0 [pV1] + prefetcht0 [pV2] + prefetcht0 [pV1 + 32] + + mov eax, dword ptr pV1 + mov ebx, dword ptr pV2 + + xorps xmm0, xmm0 + + mov ecx, overlapLengthLocal + shr ecx, 3 // div by eight + + loop1: + prefetcht0 [eax + 64] // give a prefetch hint to CPU what data are to be needed soonish + prefetcht0 [ebx + 32] // give a prefetch hint to CPU what data are to be needed soonish + movups xmm1, [eax] + mulps xmm1, [ebx] + addps xmm0, xmm1 + + movups xmm2, [eax + 16] + mulps xmm2, [ebx + 16] + addps xmm0, xmm2 + + prefetcht0 [eax + 96] // give a prefetch hint to CPU what data are to be needed soonish + prefetcht0 [ebx + 64] // give a prefetch hint to CPU what data are to be needed soonish + + movups xmm3, [eax + 32] + mulps xmm3, [ebx + 32] + addps xmm0, xmm3 + + movups xmm4, [eax + 48] + mulps xmm4, [ebx + 48] + addps xmm0, xmm4 + + add eax, 64 + add ebx, 64 + + dec ecx + jnz loop1 + + // add the four floats of xmm0 together and return the result. + + movhlps xmm1, xmm0 // move 3 & 4 of xmm0 to 1 & 2 of xmm1 + addps xmm1, xmm0 + movaps xmm2, xmm1 + shufps xmm2, xmm2, 0x01 // move 2 of xmm2 as 1 of xmm2 + addss xmm2, xmm1 + movss corr, xmm2 + } + + return (double)corr; + */ +} + + +////////////////////////////////////////////////////////////////////////////// +// +// implementation of SSE optimized functions of class 'FIRFilter' +// +////////////////////////////////////////////////////////////////////////////// + +#include "FIRFilter.h" + +FIRFilterSSE::FIRFilterSSE() : FIRFilter() +{ + filterCoeffsAlign = NULL; + filterCoeffsUnalign = NULL; +} + + +FIRFilterSSE::~FIRFilterSSE() +{ + delete[] filterCoeffsUnalign; + filterCoeffsAlign = NULL; + filterCoeffsUnalign = NULL; +} + + +// (overloaded) Calculates filter coefficients for SSE routine +void FIRFilterSSE::setCoefficients(const float *coeffs, uint newLength, uint uResultDivFactor) +{ + uint i; + float fDivider; + + FIRFilter::setCoefficients(coeffs, newLength, uResultDivFactor); + + // Scale the filter coefficients so that it won't be necessary to scale the filtering result + // also rearrange coefficients suitably for 3DNow! + // Ensure that filter coeffs array is aligned to 16-byte boundary + delete[] filterCoeffsUnalign; + filterCoeffsUnalign = new float[2 * newLength + 4]; + filterCoeffsAlign = (float *)(((unsigned long)filterCoeffsUnalign + 15) & (ulong)-16); + + fDivider = (float)resultDivider; + + // rearrange the filter coefficients for mmx routines + for (i = 0; i < newLength; i ++) + { + filterCoeffsAlign[2 * i + 0] = + filterCoeffsAlign[2 * i + 1] = coeffs[i + 0] / fDivider; + } +} + + + +// SSE-optimized version of the filter routine for stereo sound +uint FIRFilterSSE::evaluateFilterStereo(float *dest, const float *source, uint numSamples) const +{ + int count = (int)((numSamples - length) & (uint)-2); + int j; + + assert(count % 2 == 0); + + if (count < 2) return 0; + + assert(source != NULL); + assert(dest != NULL); + assert((length % 8) == 0); + assert(filterCoeffsAlign != NULL); + assert(((ulong)filterCoeffsAlign) % 16 == 0); + + // filter is evaluated for two stereo samples with each iteration, thus use of 'j += 2' + for (j = 0; j < count; j += 2) + { + const float *pSrc; + const __m128 *pFil; + __m128 sum1, sum2; + uint i; + + pSrc = (const float*)source; // source audio data + pFil = (const __m128*)filterCoeffsAlign; // filter coefficients. NOTE: Assumes coefficients + // are aligned to 16-byte boundary + sum1 = sum2 = _mm_setzero_ps(); + + for (i = 0; i < length / 8; i ++) + { + // Unroll loop for efficiency & calculate filter for 2*2 stereo samples + // at each pass + + // sum1 is accu for 2*2 filtered stereo sound data at the primary sound data offset + // sum2 is accu for 2*2 filtered stereo sound data for the next sound sample offset. + + sum1 = _mm_add_ps(sum1, _mm_mul_ps(_mm_loadu_ps(pSrc) , pFil[0])); + sum2 = _mm_add_ps(sum2, _mm_mul_ps(_mm_loadu_ps(pSrc + 2), pFil[0])); + + sum1 = _mm_add_ps(sum1, _mm_mul_ps(_mm_loadu_ps(pSrc + 4), pFil[1])); + sum2 = _mm_add_ps(sum2, _mm_mul_ps(_mm_loadu_ps(pSrc + 6), pFil[1])); + + sum1 = _mm_add_ps(sum1, _mm_mul_ps(_mm_loadu_ps(pSrc + 8) , pFil[2])); + sum2 = _mm_add_ps(sum2, _mm_mul_ps(_mm_loadu_ps(pSrc + 10), pFil[2])); + + sum1 = _mm_add_ps(sum1, _mm_mul_ps(_mm_loadu_ps(pSrc + 12), pFil[3])); + sum2 = _mm_add_ps(sum2, _mm_mul_ps(_mm_loadu_ps(pSrc + 14), pFil[3])); + + pSrc += 16; + pFil += 4; + } + + // Now sum1 and sum2 both have a filtered 2-channel sample each, but we still need + // to sum the two hi- and lo-floats of these registers together. + + // post-shuffle & add the filtered values and store to dest. + _mm_storeu_ps(dest, _mm_add_ps( + _mm_shuffle_ps(sum1, sum2, _MM_SHUFFLE(1,0,3,2)), // s2_1 s2_0 s1_3 s1_2 + _mm_shuffle_ps(sum1, sum2, _MM_SHUFFLE(3,2,1,0)) // s2_3 s2_2 s1_1 s1_0 + )); + source += 4; + dest += 4; + } + + // Ideas for further improvement: + // 1. If it could be guaranteed that 'source' were always aligned to 16-byte + // boundary, a faster aligned '_mm_load_ps' instruction could be used. + // 2. If it could be guaranteed that 'dest' were always aligned to 16-byte + // boundary, a faster '_mm_store_ps' instruction could be used. + + return (uint)count; + + /* original routine in C-language. please notice the C-version has differently + organized coefficients though. + double suml1, suml2; + double sumr1, sumr2; + uint i, j; + + for (j = 0; j < count; j += 2) + { + const float *ptr; + const float *pFil; + + suml1 = sumr1 = 0.0; + suml2 = sumr2 = 0.0; + ptr = src; + pFil = filterCoeffs; + for (i = 0; i < lengthLocal; i ++) + { + // unroll loop for efficiency. + + suml1 += ptr[0] * pFil[0] + + ptr[2] * pFil[2] + + ptr[4] * pFil[4] + + ptr[6] * pFil[6]; + + sumr1 += ptr[1] * pFil[1] + + ptr[3] * pFil[3] + + ptr[5] * pFil[5] + + ptr[7] * pFil[7]; + + suml2 += ptr[8] * pFil[0] + + ptr[10] * pFil[2] + + ptr[12] * pFil[4] + + ptr[14] * pFil[6]; + + sumr2 += ptr[9] * pFil[1] + + ptr[11] * pFil[3] + + ptr[13] * pFil[5] + + ptr[15] * pFil[7]; + + ptr += 16; + pFil += 8; + } + dest[0] = (float)suml1; + dest[1] = (float)sumr1; + dest[2] = (float)suml2; + dest[3] = (float)sumr2; + + src += 4; + dest += 4; + } + */ + + + /* Similar routine in assembly, again obsoleted due to maintainability + _asm + { + // Very important note: data in 'src' _must_ be aligned to + // 16-byte boundary! + mov edx, count + mov ebx, dword ptr src + mov eax, dword ptr dest + shr edx, 1 + + loop1: + // "outer loop" : during each round 2*2 output samples are calculated + + // give prefetch hints to CPU of what data are to be needed soonish + prefetcht0 [ebx] + prefetcht0 [filterCoeffsLocal] + + mov esi, ebx + mov edi, filterCoeffsLocal + xorps xmm0, xmm0 + xorps xmm1, xmm1 + mov ecx, lengthLocal + + loop2: + // "inner loop" : during each round eight FIR filter taps are evaluated for 2*2 samples + prefetcht0 [esi + 32] // give a prefetch hint to CPU what data are to be needed soonish + prefetcht0 [edi + 32] // give a prefetch hint to CPU what data are to be needed soonish + + movups xmm2, [esi] // possibly unaligned load + movups xmm3, [esi + 8] // possibly unaligned load + mulps xmm2, [edi] + mulps xmm3, [edi] + addps xmm0, xmm2 + addps xmm1, xmm3 + + movups xmm4, [esi + 16] // possibly unaligned load + movups xmm5, [esi + 24] // possibly unaligned load + mulps xmm4, [edi + 16] + mulps xmm5, [edi + 16] + addps xmm0, xmm4 + addps xmm1, xmm5 + + prefetcht0 [esi + 64] // give a prefetch hint to CPU what data are to be needed soonish + prefetcht0 [edi + 64] // give a prefetch hint to CPU what data are to be needed soonish + + movups xmm6, [esi + 32] // possibly unaligned load + movups xmm7, [esi + 40] // possibly unaligned load + mulps xmm6, [edi + 32] + mulps xmm7, [edi + 32] + addps xmm0, xmm6 + addps xmm1, xmm7 + + movups xmm4, [esi + 48] // possibly unaligned load + movups xmm5, [esi + 56] // possibly unaligned load + mulps xmm4, [edi + 48] + mulps xmm5, [edi + 48] + addps xmm0, xmm4 + addps xmm1, xmm5 + + add esi, 64 + add edi, 64 + dec ecx + jnz loop2 + + // Now xmm0 and xmm1 both have a filtered 2-channel sample each, but we still need + // to sum the two hi- and lo-floats of these registers together. + + movhlps xmm2, xmm0 // xmm2 = xmm2_3 xmm2_2 xmm0_3 xmm0_2 + movlhps xmm2, xmm1 // xmm2 = xmm1_1 xmm1_0 xmm0_3 xmm0_2 + shufps xmm0, xmm1, 0xe4 // xmm0 = xmm1_3 xmm1_2 xmm0_1 xmm0_0 + addps xmm0, xmm2 + + movaps [eax], xmm0 + add ebx, 16 + add eax, 16 + + dec edx + jnz loop1 + } + */ +} + +#endif // ALLOW_SSE diff --git a/pysoundtouch/soundtouch/source/SoundTouchDLL/SoundTouchDLL.cpp b/pysoundtouch/soundtouch/source/SoundTouchDLL/SoundTouchDLL.cpp new file mode 100644 index 0000000..485811c --- /dev/null +++ b/pysoundtouch/soundtouch/source/SoundTouchDLL/SoundTouchDLL.cpp @@ -0,0 +1,327 @@ +////////////////////////////////////////////////////////////////////////////// +/// +/// SoundTouch DLL wrapper - wraps SoundTouch routines into a Dynamic Load +/// Library interface. +/// +/// Author : Copyright (c) Olli Parviainen +/// Author e-mail : oparviai 'at' iki.fi +/// SoundTouch WWW: http://www.surina.net/soundtouch +/// +//////////////////////////////////////////////////////////////////////////////// +// +// $Id: SoundTouchDLL.cpp 65 2009-02-23 08:33:13Z oparviai $ +// +//////////////////////////////////////////////////////////////////////////////// +// +// License : +// +// SoundTouch audio processing library +// Copyright (c) Olli Parviainen +// +// 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 library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +//////////////////////////////////////////////////////////////////////////////// + +#include +#include "SoundTouchDLL.h" +#include "soundtouch.h" + +using namespace soundtouch; + +BOOL APIENTRY DllMain( HANDLE hModule, + DWORD ul_reason_for_call, + LPVOID lpReserved + ) +{ + switch (ul_reason_for_call) + { + case DLL_PROCESS_ATTACH: + case DLL_THREAD_ATTACH: + case DLL_THREAD_DETACH: + case DLL_PROCESS_DETACH: + break; + } + return TRUE; +} + + +////////////// + +typedef struct +{ + DWORD dwMagic; + SoundTouch *pst; +} STHANDLE; + +#define STMAGIC 0x1770C001 + +SOUNDTOUCHDLL_API HANDLE __stdcall soundtouch_createInstance() +{ + STHANDLE *tmp = new STHANDLE; + + if (tmp) + { + tmp->dwMagic = STMAGIC; + tmp->pst = new SoundTouch(); + if (tmp->pst == NULL) + { + delete tmp; + tmp = NULL; + } + } + return (HANDLE)tmp; +} + + +SOUNDTOUCHDLL_API void __stdcall soundtouch_destroyInstance(HANDLE h) +{ + /* + STHANDLE *sth = (STHANDLE*)h; + if (sth->dwMagic != STMAGIC) return; +*/ + + /* + sth->dwMagic = 0; + delete sth->pst; + sth->pst = NULL; + delete sth; +*/ +} + + +/// Get SoundTouch library version string +SOUNDTOUCHDLL_API const char *__stdcall soundtouch_getVersionString() +{ + return SoundTouch::getVersionString(); +} + +/// Get SoundTouch library version Id +SOUNDTOUCHDLL_API uint __stdcall soundtouch_getVersionId() +{ + return SoundTouch::getVersionId(); +} + +/// Sets new rate control value. Normal rate = 1.0, smaller values +/// represent slower rate, larger faster rates. +SOUNDTOUCHDLL_API void __stdcall soundtouch_setRate(HANDLE h, float newRate) +{ + STHANDLE *sth = (STHANDLE*)h; + if (sth->dwMagic != STMAGIC) return; + + sth->pst->setRate(newRate); +} + + +/// Sets new tempo control value. Normal tempo = 1.0, smaller values +/// represent slower tempo, larger faster tempo. +SOUNDTOUCHDLL_API void __stdcall soundtouch_setTempo(HANDLE h, float newTempo) +{ + STHANDLE *sth = (STHANDLE*)h; + if (sth->dwMagic != STMAGIC) return; + + sth->pst->setTempo(newTempo); +} + +/// Sets new rate control value as a difference in percents compared +/// to the original rate (-50 .. +100 %) +SOUNDTOUCHDLL_API void __stdcall soundtouch_setRateChange(HANDLE h, float newRate) +{ + STHANDLE *sth = (STHANDLE*)h; + if (sth->dwMagic != STMAGIC) return; + + sth->pst->setRateChange(newRate); +} + +/// Sets new tempo control value as a difference in percents compared +/// to the original tempo (-50 .. +100 %) +SOUNDTOUCHDLL_API void __stdcall soundtouch_setTempoChange(HANDLE h, float newTempo) +{ + STHANDLE *sth = (STHANDLE*)h; + if (sth->dwMagic != STMAGIC) return; + + sth->pst->setTempoChange(newTempo); +} + +/// Sets new pitch control value. Original pitch = 1.0, smaller values +/// represent lower pitches, larger values higher pitch. +SOUNDTOUCHDLL_API void __stdcall soundtouch_setPitch(HANDLE h, float newPitch) +{ + STHANDLE *sth = (STHANDLE*)h; + if (sth->dwMagic != STMAGIC) return; + + sth->pst->setPitch(newPitch); +} + +/// Sets pitch change in octaves compared to the original pitch +/// (-1.00 .. +1.00) +SOUNDTOUCHDLL_API void __stdcall soundtouch_setPitchOctaves(HANDLE h, float newPitch) +{ + STHANDLE *sth = (STHANDLE*)h; + if (sth->dwMagic != STMAGIC) return; + + sth->pst->setPitchOctaves(newPitch); +} + +/// Sets pitch change in semi-tones compared to the original pitch +/// (-12 .. +12) +SOUNDTOUCHDLL_API void __stdcall soundtouch_setPitchSemiTones(HANDLE h, float newPitch) +{ + STHANDLE *sth = (STHANDLE*)h; + if (sth->dwMagic != STMAGIC) return; + + sth->pst->setPitchSemiTones(newPitch); +} + + +/// Sets the number of channels, 1 = mono, 2 = stereo +SOUNDTOUCHDLL_API void __stdcall soundtouch_setChannels(HANDLE h, uint numChannels) +{ + STHANDLE *sth = (STHANDLE*)h; + if (sth->dwMagic != STMAGIC) return; + + sth->pst->setChannels(numChannels); +} + +/// Sets sample rate. +SOUNDTOUCHDLL_API void __stdcall soundtouch_setSampleRate(HANDLE h, uint srate) +{ + STHANDLE *sth = (STHANDLE*)h; + if (sth->dwMagic != STMAGIC) return; + + sth->pst->setSampleRate(srate); +} + +/// Flushes the last samples from the processing pipeline to the output. +/// Clears also the internal processing buffers. +// +/// Note: This function is meant for extracting the last samples of a sound +/// stream. This function may introduce additional blank samples in the end +/// of the sound stream, and thus it's not recommended to call this function +/// in the middle of a sound stream. +SOUNDTOUCHDLL_API void __stdcall soundtouch_flush(HANDLE h) +{ + STHANDLE *sth = (STHANDLE*)h; + if (sth->dwMagic != STMAGIC) return; + + sth->pst->flush(); +} + +/// Adds 'numSamples' pcs of samples from the 'samples' memory position into +/// the input of the object. Notice that sample rate _has_to_ be set before +/// calling this function, otherwise throws a runtime_error exception. +SOUNDTOUCHDLL_API void __stdcall soundtouch_putSamples(HANDLE h, + const SAMPLETYPE *samples, ///< Pointer to sample buffer. + uint numSamples ///< Number of samples in buffer. Notice + ///< that in case of stereo-sound a single sample + ///< contains data for both channels. + ) +{ + STHANDLE *sth = (STHANDLE*)h; + if (sth->dwMagic != STMAGIC) return; + + sth->pst->putSamples(samples, numSamples); +} + +/// Clears all the samples in the object's output and internal processing +/// buffers. +SOUNDTOUCHDLL_API void __stdcall soundtouch_clear(HANDLE h) +{ + STHANDLE *sth = (STHANDLE*)h; + if (sth->dwMagic != STMAGIC) return; + + sth->pst->clear(); +} + +/// Changes a setting controlling the processing system behaviour. See the +/// 'SETTING_...' defines for available setting ID's. +/// +/// \return 'TRUE' if the setting was succesfully changed +SOUNDTOUCHDLL_API BOOL __stdcall soundtouch_setSetting(HANDLE h, + int settingId, ///< Setting ID number. see SETTING_... defines. + int value ///< New setting value. + ) +{ + STHANDLE *sth = (STHANDLE*)h; + if (sth->dwMagic != STMAGIC) return FALSE; + + return sth->pst->setSetting(settingId, value); +} + +/// Reads a setting controlling the processing system behaviour. See the +/// 'SETTING_...' defines for available setting ID's. +/// +/// \return the setting value. +SOUNDTOUCHDLL_API int __stdcall soundtouch_getSetting(HANDLE h, + int settingId ///< Setting ID number, see SETTING_... defines. + ) +{ + STHANDLE *sth = (STHANDLE*)h; + if (sth->dwMagic != STMAGIC) return -1; + + return sth->pst->getSetting(settingId); +} + + +/// Returns number of samples currently unprocessed. +SOUNDTOUCHDLL_API uint __stdcall soundtouch_numUnprocessedSamples(HANDLE h) +{ + STHANDLE *sth = (STHANDLE*)h; + if (sth->dwMagic != STMAGIC) return 0; + + return sth->pst->numUnprocessedSamples(); +} + + +/// Adjusts book-keeping so that given number of samples are removed from beginning of the +/// sample buffer without copying them anywhere. +/// +/// Used to reduce the number of samples in the buffer when accessing the sample buffer directly +/// with 'ptrBegin' function. +SOUNDTOUCHDLL_API uint __stdcall soundtouch_receiveSamples(HANDLE h, + SAMPLETYPE *outBuffer, ///< Buffer where to copy output samples. + uint maxSamples ///< How many samples to receive at max. + ) +{ + STHANDLE *sth = (STHANDLE*)h; + if (sth->dwMagic != STMAGIC) return 0; + + if (outBuffer) + { + return sth->pst->receiveSamples(outBuffer, maxSamples); + } + else + { + return sth->pst->receiveSamples(maxSamples); + } +} + +/// Returns number of samples currently available. +SOUNDTOUCHDLL_API uint __stdcall soundtouch_numSamples(HANDLE h) +{ + STHANDLE *sth = (STHANDLE*)h; + if (sth->dwMagic != STMAGIC) return 0; + + return sth->pst->numSamples(); +} + + +/// Returns nonzero if there aren't any samples available for outputting. +SOUNDTOUCHDLL_API int __stdcall soundtouch_isEmpty(HANDLE h) +{ + STHANDLE *sth = (STHANDLE*)h; + if (sth->dwMagic != STMAGIC) return -1; + + return sth->pst->isEmpty(); +} diff --git a/pysoundtouch/soundtouch/source/SoundTouchDLL/SoundTouchDLL.h b/pysoundtouch/soundtouch/source/SoundTouchDLL/SoundTouchDLL.h new file mode 100644 index 0000000..696b6b6 --- /dev/null +++ b/pysoundtouch/soundtouch/source/SoundTouchDLL/SoundTouchDLL.h @@ -0,0 +1,164 @@ +////////////////////////////////////////////////////////////////////////////// +/// +/// SoundTouch DLL wrapper - wraps SoundTouch routines into a Dynamic Load +/// Library interface. +/// +/// Author : Copyright (c) Olli Parviainen +/// Author e-mail : oparviai 'at' iki.fi +/// SoundTouch WWW: http://www.surina.net/soundtouch +/// +//////////////////////////////////////////////////////////////////////////////// +// +// $Id: SoundTouchDLL.h 65 2009-02-23 08:33:13Z oparviai $ +// +//////////////////////////////////////////////////////////////////////////////// +// +// License : +// +// SoundTouch audio processing library +// Copyright (c) Olli Parviainen +// +// 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 library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +//////////////////////////////////////////////////////////////////////////////// + +#ifndef _SoundTouchDLL_h_ +#define _SoundTouchDLL_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef DLL_EXPORTS + #define SOUNDTOUCHDLL_API __declspec(dllexport) +#else + #define SOUNDTOUCHDLL_API __declspec(dllimport) +#endif + +typedef void * HANDLE; + +/// Create a new instance of SoundTouch processor. +SOUNDTOUCHDLL_API HANDLE __stdcall soundtouch_createInstance(); + +/// Destroys a SoundTouch processor instance. +SOUNDTOUCHDLL_API void __stdcall soundtouch_destroyInstance(HANDLE h); + +/// Get SoundTouch library version string +SOUNDTOUCHDLL_API const char *__stdcall soundtouch_getVersionString(); + +/// Get SoundTouch library version Id +SOUNDTOUCHDLL_API unsigned int __stdcall soundtouch_getVersionId(); + +/// Sets new rate control value. Normal rate = 1.0, smaller values +/// represent slower rate, larger faster rates. +SOUNDTOUCHDLL_API void __stdcall soundtouch_setRate(HANDLE h, float newRate); + +/// Sets new tempo control value. Normal tempo = 1.0, smaller values +/// represent slower tempo, larger faster tempo. +SOUNDTOUCHDLL_API void __stdcall soundtouch_setTempo(HANDLE h, float newTempo); + +/// Sets new rate control value as a difference in percents compared +/// to the original rate (-50 .. +100 %); +SOUNDTOUCHDLL_API void __stdcall soundtouch_setRateChange(HANDLE h, float newRate); + +/// Sets new tempo control value as a difference in percents compared +/// to the original tempo (-50 .. +100 %); +SOUNDTOUCHDLL_API void __stdcall soundtouch_setTempoChange(HANDLE h, float newTempo); + +/// Sets new pitch control value. Original pitch = 1.0, smaller values +/// represent lower pitches, larger values higher pitch. +SOUNDTOUCHDLL_API void __stdcall soundtouch_setPitch(HANDLE h, float newPitch); + +/// Sets pitch change in octaves compared to the original pitch +/// (-1.00 .. +1.00); +SOUNDTOUCHDLL_API void __stdcall soundtouch_setPitchOctaves(HANDLE h, float newPitch); + +/// Sets pitch change in semi-tones compared to the original pitch +/// (-12 .. +12); +SOUNDTOUCHDLL_API void __stdcall soundtouch_setPitchSemiTones(HANDLE h, float newPitch); + + +/// Sets the number of channels, 1 = mono, 2 = stereo +SOUNDTOUCHDLL_API void __stdcall soundtouch_setChannels(HANDLE h, unsigned int numChannels); + +/// Sets sample rate. +SOUNDTOUCHDLL_API void __stdcall soundtouch_setSampleRate(HANDLE h, unsigned int srate); + +/// Flushes the last samples from the processing pipeline to the output. +/// Clears also the internal processing buffers. +// +/// Note: This function is meant for extracting the last samples of a sound +/// stream. This function may introduce additional blank samples in the end +/// of the sound stream, and thus it's not recommended to call this function +/// in the middle of a sound stream. +SOUNDTOUCHDLL_API void __stdcall soundtouch_flush(HANDLE h); + +/// Adds 'numSamples' pcs of samples from the 'samples' memory position into +/// the input of the object. Notice that sample rate _has_to_ be set before +/// calling this function, otherwise throws a runtime_error exception. +SOUNDTOUCHDLL_API void __stdcall soundtouch_putSamples(HANDLE h, + const float *samples, ///< Pointer to sample buffer. + unsigned int numSamples ///< Number of samples in buffer. Notice + ///< that in case of stereo-sound a single sample + ///< contains data for both channels. + ); + +/// Clears all the samples in the object's output and internal processing +/// buffers. +SOUNDTOUCHDLL_API void __stdcall soundtouch_clear(HANDLE h); + +/// Changes a setting controlling the processing system behaviour. See the +/// 'SETTING_...' defines for available setting ID's. +/// +/// \return 'TRUE' if the setting was succesfully changed +SOUNDTOUCHDLL_API BOOL __stdcall soundtouch_setSetting(HANDLE h, + int settingId, ///< Setting ID number. see SETTING_... defines. + int value ///< New setting value. + ); + +/// Reads a setting controlling the processing system behaviour. See the +/// 'SETTING_...' defines for available setting ID's. +/// +/// \return the setting value. +SOUNDTOUCHDLL_API int __stdcall soundtouch_getSetting(HANDLE h, + int settingId ///< Setting ID number, see SETTING_... defines. + ); + + +/// Returns number of samples currently unprocessed. +SOUNDTOUCHDLL_API unsigned int __stdcall soundtouch_numUnprocessedSamples(HANDLE h); + +/// Adjusts book-keeping so that given number of samples are removed from beginning of the +/// sample buffer without copying them anywhere. +/// +/// Used to reduce the number of samples in the buffer when accessing the sample buffer directly +/// with 'ptrBegin' function. +SOUNDTOUCHDLL_API unsigned int __stdcall soundtouch_receiveSamples(HANDLE h, + float *outBuffer, ///< Buffer where to copy output samples. + unsigned int maxSamples ///< How many samples to receive at max. + ); + +/// Returns number of samples currently available. +SOUNDTOUCHDLL_API unsigned int __stdcall soundtouch_numSamples(HANDLE h); + +/// Returns nonzero if there aren't any samples available for outputting. +SOUNDTOUCHDLL_API int __stdcall soundtouch_isEmpty(HANDLE h); + +#ifdef __cplusplus +} +#endif + +#endif // _SoundTouchDLL_h_ + diff --git a/pysoundtouch/soundtouch/source/SoundTouchDLL/SoundTouchDLL.pas b/pysoundtouch/soundtouch/source/SoundTouchDLL/SoundTouchDLL.pas new file mode 100644 index 0000000..f6a4911 --- /dev/null +++ b/pysoundtouch/soundtouch/source/SoundTouchDLL/SoundTouchDLL.pas @@ -0,0 +1,469 @@ +unit SoundTouchDLL; + +////////////////////////////////////////////////////////////////////////////// +// +// SoundTouch.dll wrapper for accessing SoundTouch routines from Delphi/Pascal +// +// Module Author : Christian Budde +// +//////////////////////////////////////////////////////////////////////////////// +// +// $Id: SoundTouchDLL.pas 66 2009-02-24 14:32:44Z oparviai $ +// +//////////////////////////////////////////////////////////////////////////////// +// +// License : +// +// SoundTouch audio processing library +// Copyright (c) Olli Parviainen +// +// 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 library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +//////////////////////////////////////////////////////////////////////////////// + +interface + +uses + Windows; + +type + TSoundTouchHandle = THandle; + + // Create a new instance of SoundTouch processor. + TSoundTouchCreateInstance = function : TSoundTouchHandle; stdcall; + + // Destroys a SoundTouch processor instance. + TSoundTouchDestroyInstance = procedure (Handle: TSoundTouchHandle); stdcall; + + // Get SoundTouch library version string + TSoundTouchGetVersionString = function : PChar; stdcall; + + // Get SoundTouch library version Id + TSoundTouchGetVersionId = function : Cardinal; stdcall; + + // Sets new rate control value. Normal rate = 1.0, smaller values + // represent slower rate, larger faster rates. + TSoundTouchSetRate = procedure (Handle: TSoundTouchHandle; newRate: Single); stdcall; + + // Sets new tempo control value. Normal tempo = 1.0, smaller values + // represent slower tempo, larger faster tempo. + TSoundTouchSetTempo = procedure (Handle: TSoundTouchHandle; newTempo: Single); stdcall; + + // Sets new rate control value as a difference in percents compared + // to the original rate (-50 .. +100 %); + TSoundTouchSetRateChange = procedure (Handle: TSoundTouchHandle; newRate: Single); stdcall; + + // Sets new tempo control value as a difference in percents compared + // to the original tempo (-50 .. +100 %); + TSoundTouchSetTempoChange = procedure (Handle: TSoundTouchHandle; newTempo: Single); stdcall; + + // Sets new pitch control value. Original pitch = 1.0, smaller values + // represent lower pitches, larger values higher pitch. + TSoundTouchSetPitch = procedure (Handle: TSoundTouchHandle; newPitch: Single); stdcall; + + // Sets pitch change in octaves compared to the original pitch + // (-1.00 .. +1.00); + TSoundTouchSetPitchOctaves = procedure (Handle: TSoundTouchHandle; newPitch: Single); stdcall; + + // Sets pitch change in semi-tones compared to the original pitch + // (-12 .. +12); + TSoundTouchSetPitchSemiTones = procedure (Handle: TSoundTouchHandle; newPitch: Single); stdcall; + + + // Sets the number of channels, 1 = mono, 2 = stereo + TSoundTouchSetChannels = procedure (Handle: TSoundTouchHandle; numChannels: Cardinal); stdcall; + + // Sets sample rate. + TSoundTouchSetSampleRate = procedure (Handle: TSoundTouchHandle; SampleRate: Cardinal); stdcall; + + // Flushes the last samples from the processing pipeline to the output. + // Clears also the internal processing buffers. + // + // Note: This function is meant for extracting the last samples of a sound + // stream. This function may introduce additional blank samples in the end + // of the sound stream, and thus it + // in the middle of a sound stream. + TSoundTouchFlush = procedure (Handle: TSoundTouchHandle); stdcall; + + // Adds 'numSamples' pcs of samples from the 'samples' memory position into + // the input of the object. Notice that sample rate _has_to_ be set before + // calling this function, otherwise throws a runtime_error exception. + TSoundTouchPutSamples = procedure (Handle: TSoundTouchHandle; + const Samples: PSingle; //< Pointer to sample buffer. + NumSamples: Cardinal //< Number of samples in buffer. Notice + //< that in case of stereo-sound a single sample + //< contains data for both channels. + ); stdcall; + + // Clears all the samples in the object's output and internal processing + // buffers. + TSoundTouchClear = procedure (Handle: TSoundTouchHandle); stdcall; + + // Changes a setting controlling the processing system behaviour. See the + // 'SETTING_...' defines for available setting ID's. + // + // \return 'TRUE' if the setting was succesfully changed + TSoundTouchSetSetting = function (Handle: TSoundTouchHandle; + SettingId: Integer; //< Setting ID number. see SETTING_... defines. + Value: Integer //< New setting value. + ): Boolean; stdcall; + + // Reads a setting controlling the processing system behaviour. See the + // 'SETTING_...' defines for available setting ID's. + // + // \return the setting value. + TSoundTouchGetSetting = function (Handle: TSoundTouchHandle; + settingId: Integer //< Setting ID number, see SETTING_... defines. + ): Integer; stdcall; + + + // Returns number of samples currently unprocessed. + TSoundTouchNumUnprocessedSamples = function (Handle: TSoundTouchHandle): Cardinal; stdcall; + + // Adjusts book-keeping so that given number of samples are removed from beginning of the + // sample buffer without copying them anywhere. + // + // Used to reduce the number of samples in the buffer when accessing the sample buffer directly + // with 'ptrBegin' function. + TSoundTouchReceiveSamples = function (Handle: TSoundTouchHandle; + outBuffer: PSingle; //< Buffer where to copy output samples. + maxSamples: Integer //< How many samples to receive at max. + ): Cardinal; stdcall; + + // Returns number of samples currently available. + TSoundTouchNumSamples = function (Handle: TSoundTouchHandle): Cardinal; stdcall; + + // Returns nonzero if there aren't any samples available for outputting. + TSoundTouchIsEmpty = function (Handle: TSoundTouchHandle): Integer; stdcall; + +var + SoundTouchCreateInstance : TSoundTouchCreateInstance; + SoundTouchDestroyInstance : TSoundTouchDestroyInstance; + SoundTouchGetVersionString : TSoundTouchGetVersionString; + SoundTouchGetVersionId : TSoundTouchGetVersionId; + SoundTouchSetRate : TSoundTouchSetRate; + SoundTouchSetTempo : TSoundTouchSetTempo; + SoundTouchSetRateChange : TSoundTouchSetRateChange; + SoundTouchSetTempoChange : TSoundTouchSetTempoChange; + SoundTouchSetPitch : TSoundTouchSetPitch; + SoundTouchSetPitchOctaves : TSoundTouchSetPitchOctaves; + SoundTouchSetPitchSemiTones : TSoundTouchSetPitchSemiTones; + SoundTouchSetChannels : TSoundTouchSetChannels; + SoundTouchSetSampleRate : TSoundTouchSetSampleRate; + SoundTouchFlush : TSoundTouchFlush; + SoundTouchPutSamples : TSoundTouchPutSamples; + SoundTouchClear : TSoundTouchClear; + SoundTouchSetSetting : TSoundTouchSetSetting; + SoundTouchGetSetting : TSoundTouchGetSetting; + SoundTouchNumUnprocessedSamples : TSoundTouchNumUnprocessedSamples; + SoundTouchReceiveSamples : TSoundTouchReceiveSamples; + SoundTouchNumSamples : TSoundTouchNumSamples; + SoundTouchIsEmpty : TSoundTouchIsEmpty; + +type + TSoundTouch = class + private + FHandle : TSoundTouchHandle; + FRate : Single; + FPitch : Single; + FTempo : Single; + FSampleRate : Single; + FChannels : Cardinal; + function GetNumSamples: Cardinal; + function GetNumUnprocessedSamples: Cardinal; + function GetIsEmpty: Integer; + function GetPitchChange: Single; + function GetRateChange: Single; + function GetTempoChange: Single; + procedure SetRate(const Value: Single); + procedure SetPitch(const Value: Single); + procedure SetTempo(const Value: Single); + procedure SetPitchChange(const Value: Single); + procedure SetRateChange(const Value: Single); + procedure SetTempoChange(const Value: Single); + procedure SetChannels(const Value: Cardinal); + procedure SetSampleRate(const Value: Single); + protected + procedure SamplerateChanged; virtual; + procedure ChannelsChanged; virtual; + procedure PitchChanged; virtual; + procedure TempoChanged; virtual; + procedure RateChanged; virtual; + public + class function GetVersionString: string; + class function GetVersionId: Cardinal; + constructor Create; virtual; + destructor Destroy; override; + procedure Flush; virtual; + procedure Clear; virtual; + + procedure PutSamples(const Samples: PSingle; const NumSamples: Cardinal); + function ReceiveSamples(const outBuffer: PSingle; const maxSamples: Integer): Cardinal; + + function SetSetting(const SettingId: Integer; const Value: Integer): Boolean; + function GetSetting(const settingId: Integer): Integer; + + property VersionString: string read GetVersionString; + property VersionID: Cardinal read GetVersionId; + property Channels: Cardinal read FChannels write SetChannels; + property Rate: Single read FRate write SetRate; + property RateChange: Single read GetRateChange write SetRateChange; + property Tempo: Single read FTempo write SetTempo; + property TempoChange: Single read GetTempoChange write SetTempoChange; + property Pitch: Single read FPitch write SetPitch; + property PitchChange: Single read GetPitchChange write SetPitchChange; + property SampleRate: Single read FSampleRate write SetSampleRate; + + property NumSamples: Cardinal read GetNumSamples; + property NumUnprocessedSamples: Cardinal read GetNumUnprocessedSamples; + property IsEmpty: Integer read GetIsEmpty; + end; + +implementation + +uses + SysUtils; + +{ TSoundTouch } + +constructor TSoundTouch.Create; +begin + inherited; + FHandle := SoundTouchCreateInstance; + FRate := 1; + FTempo := 1; + FPitch := 1; + FChannels := 1; + FSampleRate := 44100; + SamplerateChanged; + ChannelsChanged; +end; + +destructor TSoundTouch.Destroy; +begin + SoundTouchDestroyInstance(FHandle); + inherited; +end; + +procedure TSoundTouch.Flush; +begin + SoundTouchFlush(FHandle); +end; + +procedure TSoundTouch.Clear; +begin + SoundTouchClear(FHandle); +end; + +function TSoundTouch.GetIsEmpty: Integer; +begin + result := SoundTouchIsEmpty(FHandle); +end; + +function TSoundTouch.GetNumSamples: Cardinal; +begin + result := SoundTouchNumSamples(FHandle); +end; + +function TSoundTouch.GetNumUnprocessedSamples: Cardinal; +begin + result := SoundTouchNumUnprocessedSamples(FHandle); +end; + +function TSoundTouch.GetPitchChange: Single; +begin + result := 100 * (FPitch - 1.0); +end; + +function TSoundTouch.GetRateChange: Single; +begin + result := 100 * (FRate - 1.0); +end; + +function TSoundTouch.GetTempoChange: Single; +begin + result := 100 * (FTempo - 1.0); +end; + +class function TSoundTouch.GetVersionId: Cardinal; +begin + result := SoundTouchGetVersionId; +end; + +class function TSoundTouch.GetVersionString: string; +begin + result := StrPas(SoundTouchGetVersionString); +end; + +procedure TSoundTouch.SetChannels(const Value: Cardinal); +begin + if FChannels <> Value then + begin + FChannels := Value; + ChannelsChanged; + end; +end; + +procedure TSoundTouch.ChannelsChanged; +begin + assert(FChannels in [1, 2]); + SoundTouchSetChannels(FHandle, FChannels); +end; + +procedure TSoundTouch.SetPitch(const Value: Single); +begin + if FPitch <> Value then + begin + FPitch := Value; + PitchChanged; + end; +end; + +procedure TSoundTouch.PitchChanged; +begin + SoundTouchSetPitch(FHandle, FPitch); +end; + +procedure TSoundTouch.putSamples(const Samples: PSingle; + const NumSamples: Cardinal); +begin + SoundTouchPutSamples(FHandle, Samples, NumSamples); +end; + +procedure TSoundTouch.RateChanged; +begin + SoundTouchSetRate(FHandle, FRate); +end; + +function TSoundTouch.ReceiveSamples(const outBuffer: PSingle; + const maxSamples: Integer): Cardinal; +begin + result := SoundTouchReceiveSamples(FHandle, outBuffer, maxSamples); +end; + +procedure TSoundTouch.SetPitchChange(const Value: Single); +begin + Pitch := 1.0 + 0.01 * Value; +end; + +procedure TSoundTouch.SetRate(const Value: Single); +begin + if FRate <> Value then + begin + FRate := Value; + RateChanged; + end; +end; + +procedure TSoundTouch.SetRateChange(const Value: Single); +begin + Rate := 1.0 + 0.01 * Value; +end; + +procedure TSoundTouch.SetSampleRate(const Value: Single); +begin + if FSampleRate <> Value then + begin + FSampleRate := Value; + SamplerateChanged; + end; +end; + +procedure TSoundTouch.SamplerateChanged; +begin + assert(FSampleRate > 0); + SoundTouchsetSampleRate(FHandle, round(FSampleRate)); +end; + +procedure TSoundTouch.SetTempo(const Value: Single); +begin + if FTempo <> Value then + begin + FTempo := Value; + TempoChanged; + end; +end; + +procedure TSoundTouch.SetTempoChange(const Value: Single); +begin + Tempo := 1.0 + 0.01 * Value; +end; + +function TSoundTouch.GetSetting(const SettingId: Integer): Integer; +begin + result := SoundTouchGetSetting(FHandle, SettingId); +end; + +function TSoundTouch.SetSetting(const SettingId: Integer; + const Value: Integer): Boolean; +begin + result := SoundTouchSetSetting(FHandle, SettingId, Value); +end; + +procedure TSoundTouch.TempoChanged; +begin + SoundTouchsetTempo(FHandle, FTempo); +end; + +var + SoundTouchLibHandle: HINST; + SoundTouchDLL: PAnsiChar = 'SoundTouch.DLL'; + +procedure InitDLL; +begin + SoundTouchLibHandle := LoadLibrary(SoundTouchDLL); + if SoundTouchLibHandle <> 0 then + try + SoundTouchCreateInstance := GetProcAddress(SoundTouchLibHandle, PAnsiChar( 2)); //'soundtouch_createInstance'); + SoundTouchDestroyInstance := GetProcAddress(SoundTouchLibHandle, PAnsiChar( 3)); //'soundtouch_destroyInstance'); + SoundTouchGetVersionString := GetProcAddress(SoundTouchLibHandle, PAnsiChar( 7)); //'soundtouch_getVersionString'); + SoundTouchGetVersionId := GetProcAddress(SoundTouchLibHandle, PAnsiChar( 6)); //'soundtouch_getVersionId'); + SoundTouchSetRate := GetProcAddress(SoundTouchLibHandle, PAnsiChar(17)); //'soundtouch_setRate'); + SoundTouchSetTempo := GetProcAddress(SoundTouchLibHandle, PAnsiChar(21)); //'soundtouch_setTempo'); + SoundTouchSetRateChange := GetProcAddress(SoundTouchLibHandle, PAnsiChar(18)); //'soundtouch_setRateChange'); + SoundTouchSetTempoChange := GetProcAddress(SoundTouchLibHandle, PAnsiChar(22)); //'soundtouch_setTempoChange'); + SoundTouchSetPitch := GetProcAddress(SoundTouchLibHandle, PAnsiChar(14)); //'soundtouch_setPitch'); + SoundTouchSetPitchOctaves := GetProcAddress(SoundTouchLibHandle, PAnsiChar(15)); //'soundtouch_setPitchOctaves'); + SoundTouchSetPitchSemiTones := GetProcAddress(SoundTouchLibHandle, PAnsiChar(16)); //'soundtouch_setPitchSemiTones'); + SoundTouchSetChannels := GetProcAddress(SoundTouchLibHandle, PAnsiChar(13)); //'soundtouch_setChannels'); + SoundTouchSetSampleRate := GetProcAddress(SoundTouchLibHandle, PAnsiChar(19)); //'soundtouch_setSampleRate'); + SoundTouchFlush := GetProcAddress(SoundTouchLibHandle, PAnsiChar(4)); //'soundtouch_flush'); + SoundTouchPutSamples := GetProcAddress(SoundTouchLibHandle, PAnsiChar(11)); //'soundtouch_putSamples'); + SoundTouchClear := GetProcAddress(SoundTouchLibHandle, PAnsiChar(1)); //'soundtouch_clear'); + SoundTouchSetSetting := GetProcAddress(SoundTouchLibHandle, PAnsiChar(20)); //'soundtouch_SetSetting'); + SoundTouchGetSetting := GetProcAddress(SoundTouchLibHandle, PAnsiChar(5)); //'soundtouch_setSetting'); + SoundTouchNumUnprocessedSamples := GetProcAddress(SoundTouchLibHandle, PAnsiChar(10)); //'soundtouch_numUnprocessedSamples'); + SoundTouchReceiveSamples := GetProcAddress(SoundTouchLibHandle, PAnsiChar(12)); //'soundtouch_receiveSamples'); + SoundTouchNumSamples := GetProcAddress(SoundTouchLibHandle, PAnsiChar(9)); //'soundtouch_numSamples'); + SoundTouchIsEmpty := GetProcAddress(SoundTouchLibHandle, PAnsiChar(8)); //'soundtouch_isEmpty'); + + except + FreeLibrary(SoundTouchLibHandle); + SoundTouchLibHandle := 0; + end; +end; + +procedure FreeDLL; +begin + if SoundTouchLibHandle <> 0 then FreeLibrary(SoundTouchLibHandle); +end; + +initialization + InitDLL; + +finalization + FreeDLL; + +end. diff --git a/pysoundtouch/soundtouch/source/SoundTouchDLL/SoundTouchDLL.rc b/pysoundtouch/soundtouch/source/SoundTouchDLL/SoundTouchDLL.rc new file mode 100644 index 0000000..dca9a7c --- /dev/null +++ b/pysoundtouch/soundtouch/source/SoundTouchDLL/SoundTouchDLL.rc @@ -0,0 +1,113 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// Finnish resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FIN) +#ifdef _WIN32 +LANGUAGE LANG_FINNISH, SUBLANG_DEFAULT +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 1,5,0,0 + PRODUCTVERSION 1,5,0,0 + FILEFLAGSMASK 0x17L +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "000004b0" + BEGIN + VALUE "FileDescription", "SoundTouch Dynamic Link Library" + VALUE "FileVersion", "1, 5, 0, 0" + VALUE "InternalName", "SoundTouch" + VALUE "LegalCopyright", "Copyright (C) Olli Parviainen 1999-2009" + VALUE "OriginalFilename", "SoundTouch.dll" + VALUE "ProductName", " SoundTouch Dynamic Link Library" + VALUE "ProductVersion", "1, 5, 0, 0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0, 1200 + END +END + +#endif // Finnish resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/pysoundtouch/soundtouch/source/SoundTouchDLL/SoundTouchDLL.sln b/pysoundtouch/soundtouch/source/SoundTouchDLL/SoundTouchDLL.sln new file mode 100644 index 0000000..61b1acf --- /dev/null +++ b/pysoundtouch/soundtouch/source/SoundTouchDLL/SoundTouchDLL.sln @@ -0,0 +1,32 @@ +Microsoft Visual Studio Solution File, Format Version 8.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SoundTouchDLL", "SoundTouchDLL.vcproj", "{164DE61D-6391-4265-8273-30740117D356}" + ProjectSection(ProjectDependencies) = postProject + {68A5DD20-7057-448B-8FE0-B6AC8D205509} = {68A5DD20-7057-448B-8FE0-B6AC8D205509} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SoundTouch", "..\SoundTouch\SoundTouch.vcproj", "{68A5DD20-7057-448B-8FE0-B6AC8D205509}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + Debug = Debug + Release = Release + EndGlobalSection + GlobalSection(ProjectDependencies) = postSolution + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {164DE61D-6391-4265-8273-30740117D356}.Debug.ActiveCfg = Debug|Win32 + {164DE61D-6391-4265-8273-30740117D356}.Debug.Build.0 = Debug|Win32 + {164DE61D-6391-4265-8273-30740117D356}.Release.ActiveCfg = Release|Win32 + {164DE61D-6391-4265-8273-30740117D356}.Release.Build.0 = Release|Win32 + {68A5DD20-7057-448B-8FE0-B6AC8D205509}.Debug.ActiveCfg = Debug|Win32 + {68A5DD20-7057-448B-8FE0-B6AC8D205509}.Debug.Build.0 = Debug|Win32 + {68A5DD20-7057-448B-8FE0-B6AC8D205509}.Release.ActiveCfg = Release|Win32 + {68A5DD20-7057-448B-8FE0-B6AC8D205509}.Release.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/pysoundtouch/soundtouch/source/SoundTouchDLL/SoundTouchDLL.vcproj b/pysoundtouch/soundtouch/source/SoundTouchDLL/SoundTouchDLL.vcproj new file mode 100644 index 0000000..485f7db --- /dev/null +++ b/pysoundtouch/soundtouch/source/SoundTouchDLL/SoundTouchDLL.vcproj @@ -0,0 +1,158 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3-70-g09d2