Update of /cvsroot/audacity/lib-src/soundtouch/source/example/bpm
In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv25958/source/example/bpm

Modified Files:
        BPMDetect.cpp Makefile.am Makefile.in PeakFinder.cpp 
        PeakFinder.h bpm.dsp bpm.dsw 
Log Message:
Forced commit for version of soundtouch from 1.2 branch (update to version 
1.3.1)



Index: PeakFinder.cpp
===================================================================
RCS file: 
/cvsroot/audacity/lib-src/soundtouch/source/example/bpm/PeakFinder.cpp,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- PeakFinder.cpp      14 Mar 2004 15:51:42 -0000      1.1.1.1
+++ PeakFinder.cpp      18 Sep 2006 07:31:48 -0000      1.2
@@ -1,39 +1,43 @@
-/******************************************************************************
- *
- * 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 @ iki.fi
- * File created  : 11-Jan-2003
- *
- * Last changed  : $Date$
- * File revision : $Revision$
- *
- * $Id$
- *
- * License :
- *
- *  SoundTouch sound 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
- *
- *****************************************************************************/
+////////////////////////////////////////////////////////////////////////////////
+///
+/// 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$
+// File revision : $Revision$
+//
+// $Id$
+//
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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 <math.h>
 #include <assert.h>

Index: Makefile.in
===================================================================
RCS file: /cvsroot/audacity/lib-src/soundtouch/source/example/bpm/Makefile.in,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- Makefile.in 12 Sep 2005 07:13:20 -0000      1.2
+++ Makefile.in 18 Sep 2006 07:31:48 -0000      1.3
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.7.6 from Makefile.am.
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
 # @configure_input@
 
-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
-# Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -14,6 +14,7 @@
 
 @SET_MAKE@
 
+
 srcdir = @srcdir@
 top_srcdir = @top_srcdir@
 VPATH = @srcdir@
@@ -21,7 +22,6 @@
 pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 top_builddir = ../../..
-
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
 INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
@@ -35,7 +35,47 @@
 NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
+build_triplet = @build@
 host_triplet = @host@
+DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
+       $(srcdir)/Makefile.in $(top_srcdir)/config/am_include.mk
+subdir = source/example/bpm
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/include/soundtouch_config.h
+CONFIG_CLEAN_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 = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(libdir)"
+libLTLIBRARIES_INSTALL = $(INSTALL)
+LTLIBRARIES = $(lib_LTLIBRARIES)
+libBPM_la_LIBADD =
+am_libBPM_la_OBJECTS = BPMDetect.lo PeakFinder.lo
+libBPM_la_OBJECTS = $(am_libBPM_la_OBJECTS)
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+       $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
+       $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+       $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+       $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(libBPM_la_SOURCES)
+DIST_SOURCES = $(libBPM_la_SOURCES)
+HEADERS = $(noinst_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMDEP_FALSE = @AMDEP_FALSE@
 AMDEP_TRUE = @AMDEP_TRUE@
@@ -53,7 +93,6 @@
 CXX = @CXX@
 CXXCPP = @CXXCPP@
 CXXDEPMODE = @CXXDEPMODE@
-
 CXXFLAGS = @CXXFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
@@ -70,16 +109,12 @@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-
 LDFLAGS = @LDFLAGS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
 MAKEINFO = @MAKEINFO@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
@@ -107,6 +142,8 @@
 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@
@@ -127,6 +164,7 @@
 libexecdir = @libexecdir@
 localstatedir = @localstatedir@
 mandir = @mandir@
+mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
@@ -134,7 +172,6 @@
 sharedstatedir = @sharedstatedir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
-
 INCLUDES = -I$(top_srcdir)/include
 
 # doc directory
@@ -142,80 +179,69 @@
 
 # set to something if you want other stuff to be included in the distribution 
tarball
 EXTRA_DIST = bpm.dsp bpm.dsw
-
 noinst_HEADERS = PeakFinder.h
-
 lib_LTLIBRARIES = libBPM.la
 libBPM_la_SOURCES = BPMDetect.cpp PeakFinder.cpp
 
 # other compiler flags to add
 AM_CXXFLAGS = -O3 -I../../../include
-subdir = source/example/bpm
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/config/config.h
-CONFIG_CLEAN_FILES =
-LTLIBRARIES = $(lib_LTLIBRARIES)
-
-libBPM_la_LDFLAGS =
-libBPM_la_LIBADD =
-am_libBPM_la_OBJECTS = BPMDetect.lo PeakFinder.lo
-libBPM_la_OBJECTS = $(am_libBPM_la_OBJECTS)
-
-DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)/config
-depcomp = $(SHELL) $(top_srcdir)/config/depcomp
-am__depfiles_maybe = depfiles
[EMAIL PROTECTED]@DEP_FILES = ./$(DEPDIR)/BPMDetect.Plo \
[EMAIL PROTECTED]@      ./$(DEPDIR)/PeakFinder.Plo
-CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
-       $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
-LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) \
-       $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-       $(AM_CXXFLAGS) $(CXXFLAGS)
-CXXLD = $(CXX)
-CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \
-       $(AM_LDFLAGS) $(LDFLAGS) -o $@
-DIST_SOURCES = $(libBPM_la_SOURCES)
-HEADERS = $(noinst_HEADERS)
-
-DIST_COMMON = $(noinst_HEADERS) $(top_srcdir)/config/am_include.mk \
-       Makefile.am Makefile.in
-SOURCES = $(libBPM_la_SOURCES)
-
 all: all-am
 
 .SUFFIXES:
 .SUFFIXES: .cpp .lo .o .obj
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am 
$(top_srcdir)/config/am_include.mk $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+$(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 \
+               && exit 0; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  
source/example/bpm/Makefile'; \
        cd $(top_srcdir) && \
          $(AUTOMAKE) --gnu  source/example/bpm/Makefile
-Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in  
$(top_builddir)/config.status
-       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ 
$(am__depfiles_maybe)
-libLTLIBRARIES_INSTALL = $(INSTALL)
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+       @case '$?' in \
+         *config.status*) \
+           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+         *) \
+           echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ 
$(am__depfiles_maybe)'; \
+           cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ 
$(am__depfiles_maybe);; \
+       esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure 
$(CONFIG_STATUS_DEPENDENCIES)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 install-libLTLIBRARIES: $(lib_LTLIBRARIES)
        @$(NORMAL_INSTALL)
-       $(mkinstalldirs) $(DESTDIR)$(libdir)
+       test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
        @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
          if test -f $$p; then \
-           f="`echo $$p | sed -e 's|^.*/||'`"; \
-           echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) 
$(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(libdir)/$$f"; \
-           $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) 
$(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(libdir)/$$f; \
+           f=$(am__strip_dir) \
+           echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) 
$(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
+           $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) 
$(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
          else :; fi; \
        done
 
 uninstall-libLTLIBRARIES:
        @$(NORMAL_UNINSTALL)
-       @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
-           p="`echo $$p | sed -e 's|^.*/||'`"; \
-         echo " $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p"; \
-         $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \
+       @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+         p=$(am__strip_dir) \
+         echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
+         $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
        done
 
 clean-libLTLIBRARIES:
        -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
        @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
          dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
-         test "$$dir" = "$$p" && dir=.; \
+         test "$$dir" != "$$p" || dir=.; \
          echo "rm -f \"$${dir}/so_locations\""; \
          rm -f "$${dir}/so_locations"; \
        done
@@ -223,7 +249,7 @@
        $(CXXLINK) -rpath $(libdir) $(libBPM_la_LDFLAGS) $(libBPM_la_OBJECTS) 
$(libBPM_la_LIBADD) $(LIBS)
 
 mostlyclean-compile:
-       -rm -f *.$(OBJEXT) core *.core
+       -rm -f *.$(OBJEXT)
 
 distclean-compile:
        -rm -f *.tab.c
@@ -231,41 +257,26 @@
 @AMDEP_TRUE@@am__include@ @[EMAIL PROTECTED]/$(DEPDIR)/[EMAIL PROTECTED]@
 @AMDEP_TRUE@@am__include@ @[EMAIL PROTECTED]/$(DEPDIR)/[EMAIL PROTECTED]@
 
-distclean-depend:
-       -rm -rf ./$(DEPDIR)
-
 .cpp.o:
[EMAIL PROTECTED]@      if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
[EMAIL PROTECTED]@        -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
[EMAIL PROTECTED]@      then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
[EMAIL PROTECTED]@      else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
[EMAIL PROTECTED]@      fi
[EMAIL PROTECTED]@      if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" 
-c -o $@ $<; \
[EMAIL PROTECTED]@      then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else 
rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='$<' object='$@' libtool=no 
@AMDEPBACKSLASH@
[EMAIL PROTECTED]@@am__fastdepCXX_FALSE@        depfile='$(DEPDIR)/$*.Po' 
tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
[EMAIL PROTECTED]@@am__fastdepCXX_FALSE@        $(CXXDEPMODE) $(depcomp) 
@AMDEPBACKSLASH@
[EMAIL PROTECTED]@      $(CXXCOMPILE) -c -o $@ `test -f '$<' || echo 
'$(srcdir)/'`$<
[EMAIL PROTECTED]@@am__fastdepCXX_FALSE@        DEPDIR=$(DEPDIR) $(CXXDEPMODE) 
$(depcomp) @AMDEPBACKSLASH@
[EMAIL PROTECTED]@      $(CXXCOMPILE) -c -o $@ $<
 
 .cpp.obj:
[EMAIL PROTECTED]@      if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
[EMAIL PROTECTED]@        -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; 
else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
[EMAIL PROTECTED]@      then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
[EMAIL PROTECTED]@      else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
[EMAIL PROTECTED]@      fi
[EMAIL PROTECTED]@      if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" 
-c -o $@ `$(CYGPATH_W) '$<'`; \
[EMAIL PROTECTED]@      then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else 
rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='$<' object='$@' libtool=no 
@AMDEPBACKSLASH@
[EMAIL PROTECTED]@@am__fastdepCXX_FALSE@        depfile='$(DEPDIR)/$*.Po' 
tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
[EMAIL PROTECTED]@@am__fastdepCXX_FALSE@        $(CXXDEPMODE) $(depcomp) 
@AMDEPBACKSLASH@
[EMAIL PROTECTED]@      $(CXXCOMPILE) -c -o $@ `if test -f '$<'; then 
$(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
[EMAIL PROTECTED]@@am__fastdepCXX_FALSE@        DEPDIR=$(DEPDIR) $(CXXDEPMODE) 
$(depcomp) @AMDEPBACKSLASH@
[EMAIL PROTECTED]@      $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
 
 .cpp.lo:
[EMAIL PROTECTED]@      if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF 
"$(DEPDIR)/$*.Tpo" \
[EMAIL PROTECTED]@        -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
[EMAIL PROTECTED]@      then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; \
[EMAIL PROTECTED]@      else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
[EMAIL PROTECTED]@      fi
[EMAIL PROTECTED]@      if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF 
"$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
[EMAIL PROTECTED]@      then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else 
rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='$<' object='$@' libtool=yes 
@AMDEPBACKSLASH@
[EMAIL PROTECTED]@@am__fastdepCXX_FALSE@        depfile='$(DEPDIR)/$*.Plo' 
tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@
[EMAIL PROTECTED]@@am__fastdepCXX_FALSE@        $(CXXDEPMODE) $(depcomp) 
@AMDEPBACKSLASH@
[EMAIL PROTECTED]@      $(LTCXXCOMPILE) -c -o $@ `test -f '$<' || echo 
'$(srcdir)/'`$<
[EMAIL PROTECTED]@@am__fastdepCXX_FALSE@        DEPDIR=$(DEPDIR) $(CXXDEPMODE) 
$(depcomp) @AMDEPBACKSLASH@
[EMAIL PROTECTED]@      $(LTCXXCOMPILE) -c -o $@ $<
 
 mostlyclean-libtool:
        -rm -f *.lo
@@ -277,14 +288,6 @@
        -rm -f libtool
 uninstall-info-am:
 
-ETAGS = etags
-ETAGSFLAGS =
-
-CTAGS = ctags
-CTAGSFLAGS =
-
-tags: TAGS
-
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
        list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
        unique=`for i in $$list; do \
@@ -293,6 +296,7 @@
          $(AWK) '    { files[$$0] = 1; } \
               END { for (i in files) print i; }'`; \
        mkid -fID $$unique
+tags: TAGS
 
 TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
                $(TAGS_FILES) $(LISP)
@@ -304,10 +308,11 @@
          done | \
          $(AWK) '    { files[$$0] = 1; } \
               END { for (i in files) print i; }'`; \
-       test -z "$(ETAGS_ARGS)$$tags$$unique" \
-         || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-            $$tags $$unique
-
+       if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+         test -n "$$unique" || unique=$$empty_fix; \
+         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+           $$tags $$unique; \
+       fi
 ctags: CTAGS
 CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
                $(TAGS_FILES) $(LISP)
@@ -330,13 +335,9 @@
 
 distclean-tags:
        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-
-top_distdir = ../../..
-distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
 
 distdir: $(DISTFILES)
-       $(mkinstalldirs) $(distdir)/../../../config
+       $(mkdir_p) $(distdir)/../../../config
        @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
        topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
        list='$(DISTFILES)'; for file in $$list; do \
@@ -348,7 +349,7 @@
          dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
          if test "$$dir" != "$$file" && test "$$dir" != "."; then \
            dir="/$$dir"; \
-           $(mkinstalldirs) "$(distdir)$$dir"; \
+           $(mkdir_p) "$(distdir)$$dir"; \
          else \
            dir=''; \
          fi; \
@@ -366,9 +367,10 @@
 check-am: all-am
 check: check-am
 all-am: Makefile $(LTLIBRARIES) $(HEADERS)
-
 installdirs:
-       $(mkinstalldirs) $(DESTDIR)$(libdir)
+       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
@@ -380,7 +382,7 @@
 installcheck: installcheck-am
 install-strip:
        $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         INSTALL_STRIP_FLAG=-s \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
          `test -z '$(STRIP)' || \
            echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
 mostlyclean-generic:
@@ -388,7 +390,7 @@
 clean-generic:
 
 distclean-generic:
-       -rm -f Makefile $(CONFIG_CLEAN_FILES)
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
 
 maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
@@ -399,14 +401,17 @@
        mostlyclean-am
 
 distclean: distclean-am
-
-distclean-am: clean-am distclean-compile distclean-depend \
-       distclean-generic distclean-libtool distclean-tags
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+       distclean-libtool distclean-tags
 
 dvi: dvi-am
 
 dvi-am:
 
+html: html-am
+
 info: info-am
 
 info-am:
@@ -422,7 +427,8 @@
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
-
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
 maintainer-clean-am: distclean-am maintainer-clean-generic
 
 mostlyclean: mostlyclean-am
@@ -442,10 +448,10 @@
 
 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
        clean-libLTLIBRARIES clean-libtool ctags distclean \
-       distclean-compile distclean-depend distclean-generic \
-       distclean-libtool distclean-tags distdir dvi dvi-am info \
-       info-am install install-am install-data install-data-am \
-       install-exec install-exec-am install-info install-info-am \
+       distclean-compile distclean-generic distclean-libtool \
+       distclean-tags distdir dvi dvi-am html html-am info info-am \
+       install install-am install-data install-data-am install-exec \
+       install-exec-am install-info install-info-am \
        install-libLTLIBRARIES install-man install-strip installcheck \
        installcheck-am installdirs maintainer-clean \
        maintainer-clean-generic mostlyclean mostlyclean-compile \

Index: bpm.dsp
===================================================================
RCS file: /cvsroot/audacity/lib-src/soundtouch/source/example/bpm/bpm.dsp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- bpm.dsp     19 Jul 2004 00:08:59 -0000      1.2
+++ bpm.dsp     18 Sep 2006 07:31:49 -0000      1.3
@@ -1,120 +1,128 @@
-# Microsoft Developer Studio Project File - Name="bpm" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Static Library" 0x0104
-
-CFG=bpm - 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 "bpm.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 "bpm.mak" CFG="bpm - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "bpm - Win32 Release" (based on "Win32 (x86) Static Library")
-!MESSAGE "bpm - 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)" == "bpm - 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 /MT /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
-
-!ELSEIF  "$(CFG)" == "bpm - 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 /MTd /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\bpmD.lib"
-
-!ENDIF 
-
-# Begin Target
-
-# Name "bpm - Win32 Release"
-# Name "bpm - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\BPMDetect.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\PeakFinder.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=.\BPMDetect.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=.\PeakFinder.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\include\STTypes.h
-# End Source File
-# End Group
-# End Target
-# End Project
+# Microsoft Developer Studio Project File - Name="bpm" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Static Library" 0x0104
+
+CFG=bpm - 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 "bpm.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 "bpm.mak" CFG="bpm - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "bpm - Win32 Release" (based on "Win32 (x86) Static Library")
+!MESSAGE "bpm - 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)" == "bpm - 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\bpm.lib             ..\..\..\lib\ 
+# End Special Build Tool
+
+!ELSEIF  "$(CFG)" == "bpm - 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\bpmD.lib"
+# Begin Special Build Tool
+SOURCE="$(InputPath)"
+PostBuild_Cmds=copy             .\Debug\bpmD.lib             ..\..\..\lib\ 
+# End Special Build Tool
+
+!ENDIF 
+
+# Begin Target
+
+# Name "bpm - Win32 Release"
+# Name "bpm - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\BPMDetect.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\PeakFinder.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=..\..\..\include\BPMDetect.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=.\PeakFinder.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\include\STTypes.h
+# End Source File
+# End Group
+# End Target
+# End Project


Index: PeakFinder.h
===================================================================
RCS file: /cvsroot/audacity/lib-src/soundtouch/source/example/bpm/PeakFinder.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- PeakFinder.h        14 Mar 2004 15:51:42 -0000      1.1.1.1
+++ PeakFinder.h        18 Sep 2006 07:31:49 -0000      1.2
@@ -1,37 +1,41 @@
-/******************************************************************************
- *
- * 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 @ iki.fi
- * File created  : 11-Jan-2003
- *
- * Last changed  : $Date$
- * File revision : $Revision$
- *
- * $Id$
- *
- * License :
- *
- *  SoundTouch sound 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
- *
- *****************************************************************************/
+////////////////////////////////////////////////////////////////////////////////
+///
+/// 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$
+// File revision : $Revision$
+//
+// $Id$
+//
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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_
@@ -65,13 +69,13 @@
 
 public:
     /// Constructor. 
-       PeakFinder();
+    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 exact mass-center location of the largest peak hump.
-       float detectPeak(const float *data, /// Data vector to be analyzed. The 
data vector has
+    float 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.


Index: BPMDetect.cpp
===================================================================
RCS file: 
/cvsroot/audacity/lib-src/soundtouch/source/example/bpm/BPMDetect.cpp,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- BPMDetect.cpp       14 Mar 2004 15:51:42 -0000      1.1.1.1
+++ BPMDetect.cpp       18 Sep 2006 07:31:48 -0000      1.2
@@ -1,54 +1,58 @@
-/******************************************************************************
- *
- * 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 @ iki.fi
- * File created  : 11-Jan-2003
- *
- * Last changed  : $Date$
- * File revision : $Revision$
- *
- * $Id$
- *
- * License :
- *
- *  SoundTouch sound 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
- *
- *****************************************************************************/
+////////////////////////////////////////////////////////////////////////////////
+///
+/// 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$
+// File revision : $Revision$
+//
+// $Id$
+//
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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 <math.h>
 #include <assert.h>
@@ -88,10 +92,16 @@
 
     envelopeAccu = 0;
 
-    // Initialize RMS volume accumulator to RMS level of 3000, which is a 
pretty typical RMS 
-    // signal level value for songdata. This value is then adapted to the 
actual level during
-    // processing.
+    // 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
 
     init(numChannels, sampleRate);
 }
@@ -198,7 +208,7 @@
     {
         // calc average RMS volume
         RMSVolumeAccu *= avgdecay;
-        val = (float)fabs(samples[i]);
+        val = (float)fabs((float)samples[i]);
         RMSVolumeAccu += val * val;
 
         // cut amplitudes that are below 2 times average RMS volume


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs

Reply via email to