Update of /cvsroot/audacity/lib-src/libsamplerate/examples
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv13262/examples

Modified Files:
        Makefile.am Makefile.in audio_out.c audio_out.h 
        sndfile-resample.c varispeed-play.c 
Added Files:
        timewarp-file.c 
Log Message:
Upgrade libsamplerate to 0.1.7 release, with autotools cleanup but no actual 
patches (yet)


Index: audio_out.c
===================================================================
RCS file: /cvsroot/audacity/lib-src/libsamplerate/examples/audio_out.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- audio_out.c 26 Oct 2005 09:13:47 -0000      1.3
+++ audio_out.c 14 Feb 2009 22:13:50 -0000      1.4
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 1999-2003 Erik de Castro Lopo <[email protected]>
+** Copyright (C) 1999-2008 Erik de Castro Lopo <[email protected]>
 **
 ** This program is free software; you can redistribute it and/or modify
 ** it under the terms of the GNU General Public License as published by
@@ -20,7 +20,6 @@
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
-#include <errno.h>
 
 #include <config.h>
 
@@ -63,7 +62,7 @@
 static AUDIO_OUT *
 linux_open (int channels, int samplerate)
 {      LINUX_AUDIO_OUT *linux_out ;
-       int stereo, temp, error ;
+       int stereo, fmt, error ;
 
        if ((linux_out = malloc (sizeof (LINUX_AUDIO_OUT))) == NULL)
        {       perror ("linux_open : malloc ") ;
@@ -90,18 +89,18 @@
                exit (1) ;
                } ;
 
-       temp = 16 ;
-       if ((error = ioctl (linux_out->fd, SOUND_PCM_WRITE_BITS, &temp)) != 0)
-       {       perror ("linux_open : bitwidth ") ;
-               exit (1) ;
-               } ;
+       fmt = CPU_IS_BIG_ENDIAN ? AFMT_S16_BE : AFMT_S16_LE ;
+       if (ioctl (linux_out->fd, SNDCTL_DSP_SETFMT, &fmt) != 0)
+       {       perror ("linux_open_dsp_device : set format ") ;
+           exit (1) ;
+               } ;
 
-       if ((error = ioctl (linux_out->fd, SOUND_PCM_WRITE_CHANNELS, 
&channels)) != 0)
+       if ((error = ioctl (linux_out->fd, SNDCTL_DSP_CHANNELS, &channels)) != 
0)
        {       perror ("linux_open : channels ") ;
                exit (1) ;
                } ;
 
-       if ((error = ioctl (linux_out->fd, SOUND_PCM_WRITE_RATE, &samplerate)) 
!= 0)
+       if ((error = ioctl (linux_out->fd, SNDCTL_DSP_SPEED, &samplerate)) != 0)
        {       perror ("linux_open : sample rate ") ;
                exit (1) ;
                } ;
@@ -119,7 +118,7 @@
 {      LINUX_AUDIO_OUT *linux_out ;
        static float float_buffer [BUFFER_LEN] ;
        static short buffer [BUFFER_LEN] ;
-       int             k, readcount ;
+       int             k, readcount, ignored ;
 
        if ((linux_out = (LINUX_AUDIO_OUT*) audio_out) == NULL)
        {       printf ("linux_play : AUDIO_OUT is NULL.\n") ;
@@ -134,7 +133,7 @@
        while ((readcount = callback (callback_data, float_buffer, BUFFER_LEN / 
linux_out->channels)))
        {       for (k = 0 ; k < readcount * linux_out->channels ; k++)
                        buffer [k] = lrint (32767.0 * float_buffer [k]) ;
-               write (linux_out->fd, buffer, readcount * linux_out->channels * 
sizeof (short)) ;
+               ignored = write (linux_out->fd, buffer, readcount * 
linux_out->channels * sizeof (short)) ;
                } ;
 
        return ;
@@ -380,7 +379,6 @@
 
 #include <windows.h>
 #include <mmsystem.h>
-#include <mmreg.h>
 
 #define        WIN32_BUFFER_LEN        (1<<15)
 #define        WIN32_MAGIC                     MAKE_MAGIC ('W', 'i', 'n', '3', 
'2', 's', 'u', 'x')
@@ -794,7 +792,8 @@
 AUDIO_OUT *
 audio_open (int channels, int samplerate)
 {
-       channels = samplerate ;
+       (void) channels ;
+       (void) samplerate ;
 
        return NULL ;
 } /* audio_open */
@@ -802,9 +801,9 @@
 void
 audio_play (get_audio_callback_t callback, AUDIO_OUT *audio_out, void 
*callback_data)
 {
-       callback = NULL ;
-       audio_out = NULL ;
-       callback_data = NULL ;
+       (void) callback ;
+       (void) audio_out ;
+       (void) callback_data ;
 
        return ;
 } /* audio_play */
@@ -819,11 +818,3 @@
 
 #endif /* HAVE_SNDFILE */
 
-/*
-** Do not edit or modify anything in this comment block.
-** The arch-tag line is a file identity tag for the GNU Arch 
-** revision control system.
-**
-** arch-tag: 46fb3b80-7460-44ec-99b3-c893fa320b86
-*/
-

Index: sndfile-resample.c
===================================================================
RCS file: /cvsroot/audacity/lib-src/libsamplerate/examples/sndfile-resample.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- sndfile-resample.c  26 Oct 2005 09:13:47 -0000      1.3
+++ sndfile-resample.c  14 Feb 2009 22:13:50 -0000      1.4
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 2002-2004 Erik de Castro Lopo <[email protected]>
+** Copyright (C) 2002-2008 Erik de Castro Lopo <[email protected]>
 **
 ** This program is free software; you can redistribute it and/or modify
 ** it under the terms of the GNU General Public License as published by
@@ -29,6 +29,8 @@
 #include <samplerate.h>
 #include <sndfile.h>
 
+#define DEFAULT_CONVERTER SRC_SINC_MEDIUM_QUALITY
+
 #define        BUFFER_LEN              4096    /*-(1<<16)-*/
 
 static void usage_exit (const char *progname) ;
@@ -62,7 +64,7 @@
                usage_exit (argv [0]) ;
 
        /* Set default converter. */
-       converter = SRC_SINC_BEST_QUALITY ;
+       converter = DEFAULT_CONVERTER ;
 
        for (k = 1 ; k < argc - 2 ; k++)
        {       if (strcmp (argv [k], "--max-speed") == 0)
@@ -96,7 +98,7 @@
                exit (1) ;
                } ;
 
-       if (! (infile = sf_open (argv [argc - 2], SFM_READ, &sfinfo)))
+       if ((infile = sf_open (argv [argc - 2], SFM_READ, &sfinfo)) == NULL)
        {       printf ("Error : Not able to open input file '%s'\n", argv 
[argc - 2]) ;
                exit (1) ;
                } ;
@@ -117,6 +119,12 @@
                exit (1) ;
                } ;
 
+       if (fabs (src_ratio - 1.0) < 1e-20)
+       {       printf ("Target samplerate and input samplerate are the same. 
Exiting.\n") ;
+               sf_close (infile) ;
+               exit (0) ;
+               } ;
+
        printf ("SRC Ratio     : %f\n", src_ratio) ;
        printf ("Converter     : %s\n\n", src_get_name (converter)) ;
 
@@ -256,7 +264,8 @@
 
 static void
 usage_exit (const char *progname)
-{      const char      *cptr ;
+{      char lsf_ver [128] ;
+       const char      *cptr ;
        int             k ;
 
        if ((cptr = strrchr (progname, '/')) != NULL)
@@ -265,18 +274,22 @@
        if ((cptr = strrchr (progname, '\\')) != NULL)
                progname = cptr + 1 ;
 
+       
+       sf_command (NULL, SFC_GET_LIB_VERSION, lsf_ver, sizeof (lsf_ver)) ;
+
        printf ("\n"
                "  A Sample Rate Converter using libsndfile for file I/O and 
Secret \n"
                "  Rabbit Code (aka libsamplerate) for performing the 
conversion.\n"
                "  It works on any file format supported by libsndfile with any 
\n"
                "  number of channels (limited only by host memory).\n"
                "\n"
-               "  libsamplerate version : %s\n"
+               "       %s\n"
+               "       %s\n"
                "\n"
                "  Usage : \n"
                "       %s -to <new sample rate> [-c <number>] <input file> 
<output file>\n"
                "       %s -by <amount> [-c <number>] <input file> <output 
file>\n"
-               "\n", src_get_version (), progname, progname) ;
+               "\n", src_get_version (), lsf_ver, progname, progname) ;
 
        puts (
                "  The optional -c argument allows the converter type to be 
chosen from\n"
@@ -285,7 +298,7 @@
                ) ;
 
        for (k = 0 ; (cptr = src_get_name (k)) != NULL ; k++)
-               printf ("       %d : %s\n", k, cptr) ;
+               printf ("       %d : %s%s\n", k, cptr, k == DEFAULT_CONVERTER ? 
" (default)" : "") ;
 
        puts ("") ;
 
@@ -305,7 +318,7 @@
                "\n"
                
"****************************************************************\n"
                "  This example program was compiled without libsndfile \n"
-               "  (http://www.zip.com.au/~erikd/libsndfile/).\n"
+               "  (http://www.mega-nerd.com/libsndfile/).\n"
                "  It is therefore completely broken and non-functional.\n"
                
"****************************************************************\n"
                "\n"
@@ -315,11 +328,4 @@
 } /* main */
 
 #endif
-/*
-** Do not edit or modify anything in this comment block.
-** The arch-tag line is a file identity tag for the GNU Arch 
-** revision control system.
-**
-** arch-tag: 4bb75515-3b00-4e31-bc37-35f3659e61cb
-*/
 

Index: Makefile.in
===================================================================
RCS file: /cvsroot/audacity/lib-src/libsamplerate/examples/Makefile.in,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- Makefile.in 26 Oct 2005 09:13:47 -0000      1.3
+++ Makefile.in 14 Feb 2009 22:13:50 -0000      1.4
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.7.9 from Makefile.am.
+# Makefile.in generated by automake 1.10.1 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, 2006, 2007, 2008  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.
@@ -17,16 +17,11 @@
 # This file was automatically generated
 # DO NOT EDIT!
 
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
-
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -38,10 +33,61 @@
 NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
+build_triplet = @build@
 host_triplet = @host@
+target_triplet = @target@
+bin_PROGRAMS = sndfile-resample$(EXEEXT)
+noinst_PROGRAMS = varispeed-play$(EXEEXT) timewarp-file$(EXEEXT)
+subdir = examples
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/M4/libtool.m4 \
+       $(top_srcdir)/M4/ltoptions.m4 $(top_srcdir)/M4/ltsugar.m4 \
+       $(top_srcdir)/M4/ltversion.m4 $(top_srcdir)/M4/lt~obsolete.m4 \
+       $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/config.h
+CONFIG_CLEAN_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)"
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS)
+am_sndfile_resample_OBJECTS = sndfile-resample.$(OBJEXT)
+sndfile_resample_OBJECTS = $(am_sndfile_resample_OBJECTS)
+am__DEPENDENCIES_1 =
+sndfile_resample_DEPENDENCIES = $(SAMPLERATEDIR)/libsamplerate.la \
+       $(am__DEPENDENCIES_1)
+am_timewarp_file_OBJECTS = timewarp-file.$(OBJEXT)
+timewarp_file_OBJECTS = $(am_timewarp_file_OBJECTS)
+timewarp_file_DEPENDENCIES = $(SAMPLERATEDIR)/libsamplerate.la \
+       $(am__DEPENDENCIES_1)
+am_varispeed_play_OBJECTS = varispeed-play.$(OBJEXT) \
+       audio_out.$(OBJEXT)
+varispeed_play_OBJECTS = $(am_varispeed_play_OBJECTS)
+varispeed_play_DEPENDENCIES = $(SAMPLERATEDIR)/libsamplerate.la \
+       $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+DEFAULT_INCLUDES = -...@am__isrc@ -I$(top_builddir)/src
+depcomp = $(SHELL) $(top_srcdir)/Cfg/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+       $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+       --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+       $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+       --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+       $(LDFLAGS) -o $@
+SOURCES = $(sndfile_resample_SOURCES) $(timewarp_file_SOURCES) \
+       $(varispeed_play_SOURCES)
+DIST_SOURCES = $(sndfile_resample_SOURCES) $(timewarp_file_SOURCES) \
+       $(varispeed_play_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
+ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
 AMTAR = @AMTAR@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
@@ -54,45 +100,48 @@
 COMPILER_IS_GCC = @COMPILER_IS_GCC@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 DLLTOOL = @DLLTOOL@
 DLLWRAP = @DLLWRAP@
-ECHO = @ECHO@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
-EFENCE_LIB = @EFENCE_LIB@
 EGREP = @EGREP@
-ENABLE_DEBUG = @ENABLE_DEBUG@
 EXEEXT = @EXEEXT@
-F77 = @F77@
-FFLAGS = @FFLAGS@
 FFTW3_CFLAGS = @FFTW3_CFLAGS@
 FFTW3_LIBS = @FFTW3_LIBS@
+FGREP = @FGREP@
 GCC_MAJOR_VERSION = @GCC_MAJOR_VERSION@
+GREP = @GREP@
 HAVE_FFTW3 = @HAVE_FFTW3@
 HAVE_SNDFILE = @HAVE_SNDFILE@
+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@
 MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
 OS_SPECIFIC_INCLUDES = @OS_SPECIFIC_INCLUDES@
-
 OS_SPECIFIC_LINKS = @OS_SPECIFIC_LINKS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
 PACKAGE_NAME = @PACKAGE_NAME@
@@ -103,135 +152,125 @@
 PEXPORTS = @PEXPORTS@
 PKG_CONFIG = @PKG_CONFIG@
 RANLIB = @RANLIB@
+SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHARED_VERSION_INFO = @SHARED_VERSION_INFO@
 SHELL = @SHELL@
 SHLIB_VERSION_ARG = @SHLIB_VERSION_ARG@
 SNDFILE_CFLAGS = @SNDFILE_CFLAGS@
-
 SNDFILE_LIBS = @SNDFILE_LIBS@
 STRIP = @STRIP@
 VERSION = @VERSION@
-ac_ct_AR = @ac_ct_AR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+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@
+lt_ECHO = @lt_ECHO@
 mandir = @mandir@
+mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
+psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
-subdirs = @subdirs@
+srcdir = @srcdir@
 sysconfdir = @sysconfdir@
 target = @target@
 target_alias = @target_alias@
 target_cpu = @target_cpu@
 target_os = @target_os@
 target_vendor = @target_vendor@
-
-bin_PROGRAMS = sndfile-resample
-
-noinst_PROGRAMS = varispeed-play
-
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
 SAMPLERATEDIR = ../src
 INCLUDES = -I$(srcdir)/$(SAMPLERATEDIR) @OS_SPECIFIC_INCLUDES@
-
+AM_CFLAGS = @SNDFILE_CFLAGS@
 
 
#===============================================================================
 sndfile_resample_SOURCES = sndfile-resample.c
-sndfile_resample_CFLAGS = @SNDFILE_CFLAGS@
 sndfile_resample_LDADD = $(SAMPLERATEDIR)/libsamplerate.la $(SNDFILE_LIBS)
-
 varispeed_play_SOURCES = varispeed-play.c audio_out.c audio_out.h
-varispeed_play_CFLAGS = @SNDFILE_CFLAGS@
 varispeed_play_LDADD = $(SAMPLERATEDIR)/libsamplerate.la $(SNDFILE_LIBS) 
$(OS_SPECIFIC_LINKS)
-subdir = examples
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/src/config.h
-CONFIG_CLEAN_FILES =
-bin_PROGRAMS = sndfile-resample$(EXEEXT)
-noinst_PROGRAMS = varispeed-play$(EXEEXT)
-PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS)
-
-am_sndfile_resample_OBJECTS = \
-       sndfile_resample-sndfile-resample.$(OBJEXT)
-sndfile_resample_OBJECTS = $(am_sndfile_resample_OBJECTS)
-sndfile_resample_DEPENDENCIES = $(SAMPLERATEDIR)/libsamplerate.la
-sndfile_resample_LDFLAGS =
-am_varispeed_play_OBJECTS = varispeed_play-varispeed-play.$(OBJEXT) \
-       varispeed_play-audio_out.$(OBJEXT)
-varispeed_play_OBJECTS = $(am_varispeed_play_OBJECTS)
-varispeed_play_DEPENDENCIES = $(SAMPLERATEDIR)/libsamplerate.la
-varispeed_play_LDFLAGS =
-
-DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)/src
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__depfiles_maybe = depfiles
-...@amdep_true@DEP_FILES = ./$(DEPDIR)/sndfile_resample-sndfile-resample.Po \
-...@amdep_true@        ./$(DEPDIR)/varispeed_play-audio_out.Po \
-...@amdep_true@        ./$(DEPDIR)/varispeed_play-varispeed-play.Po
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
-       $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \
-       $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-       $(AM_LDFLAGS) $(LDFLAGS) -o $@
-DIST_SOURCES = $(sndfile_resample_SOURCES) $(varispeed_play_SOURCES)
-DIST_COMMON = $(srcdir)/Makefile.in Makefile.am
-SOURCES = $(sndfile_resample_SOURCES) $(varispeed_play_SOURCES)
-
+timewarp_file_SOURCES = timewarp-file.c
+timewarp_file_LDADD = $(SAMPLERATEDIR)/libsamplerate.la $(SNDFILE_LIBS)
 all: all-am
 
 .SUFFIXES:
 .SUFFIXES: .c .lo .o .obj
-$(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+               && exit 0; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  examples/Makefile'; \
        cd $(top_srcdir) && \
          $(AUTOMAKE) --gnu  examples/Makefile
-Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
-       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ 
$(am__depfiles_maybe)
-binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+.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-binPROGRAMS: $(bin_PROGRAMS)
        @$(NORMAL_INSTALL)
-       $(mkinstalldirs) $(DESTDIR)$(bindir)
+       test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
        @list='$(bin_PROGRAMS)'; for p in $$list; do \
          p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
          if test -f $$p \
             || test -f $$p1 \
          ; then \
            f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
-          echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install 
$(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \
-          $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install 
$(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f || exit 1; \
+          echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) 
$(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' 
'$(DESTDIR)$(bindir)/$$f'"; \
+          $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) 
--mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 
1; \
          else :; fi; \
        done
 
@@ -239,8 +278,8 @@
        @$(NORMAL_UNINSTALL)
        @list='$(bin_PROGRAMS)'; for p in $$list; do \
          f=`echo "$$p" | sed 
's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
-         echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
-         rm -f $(DESTDIR)$(bindir)/$$f; \
+         echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
+         rm -f "$(DESTDIR)$(bindir)/$$f"; \
        done
 
 clean-binPROGRAMS:
@@ -258,152 +297,45 @@
        done
 sndfile-resample$(EXEEXT): $(sndfile_resample_OBJECTS) 
$(sndfile_resample_DEPENDENCIES) 
        @rm -f sndfile-resample$(EXEEXT)
-       $(LINK) $(sndfile_resample_LDFLAGS) $(sndfile_resample_OBJECTS) 
$(sndfile_resample_LDADD) $(LIBS)
+       $(LINK) $(sndfile_resample_OBJECTS) $(sndfile_resample_LDADD) $(LIBS)
+timewarp-file$(EXEEXT): $(timewarp_file_OBJECTS) $(timewarp_file_DEPENDENCIES) 
+       @rm -f timewarp-file$(EXEEXT)
+       $(LINK) $(timewarp_file_OBJECTS) $(timewarp_file_LDADD) $(LIBS)
 varispeed-play$(EXEEXT): $(varispeed_play_OBJECTS) 
$(varispeed_play_DEPENDENCIES) 
        @rm -f varispeed-play$(EXEEXT)
-       $(LINK) $(varispeed_play_LDFLAGS) $(varispeed_play_OBJECTS) 
$(varispeed_play_LDADD) $(LIBS)
+       $(LINK) $(varispeed_play_OBJECTS) $(varispeed_play_LDADD) $(LIBS)
 
 mostlyclean-compile:
-       -rm -f *.$(OBJEXT) core *.core
+       -rm -f *.$(OBJEXT)
 
 distclean-compile:
        -rm -f *.tab.c
 
-...@amdep_true@@am__include@ 
@am__qu...@./$(DEPDIR)/sndfile_resample-sndfile-resample...@am__quote@
-...@amdep_true@@am__include@ 
@am__qu...@./$(DEPDIR)/varispeed_play-audio_out...@am__quote@
-...@amdep_true@@am__include@ 
@am__qu...@./$(DEPDIR)/varispeed_play-varispeed-play...@am__quote@
+...@amdep_true@@am__include@ @am__qu...@./$(DEPDIR)/audio_out...@am__quote@
+...@amdep_true@@am__include@ 
@am__qu...@./$(DEPDIR)/sndfile-resample...@am__quote@
+...@amdep_true@@am__include@ @am__qu...@./$(DEPDIR)/timewarp-file...@am__quote@
+...@amdep_true@@am__include@ 
@am__qu...@./$(DEPDIR)/varispeed-play...@am__quote@
 
 .c.o:
-...@am__fastdepcc_true@        if $(COMPILE) -MT $@ -MD -MP -MF 
"$(DEPDIR)/$*.Tpo" \
-...@am__fastdepcc_true@          -c -o $@ `test -f '$<' || echo 
'$(srcdir)/'`$<; \
-...@am__fastdepcc_true@        then mv -f "$(DEPDIR)/$*.Tpo" 
"$(DEPDIR)/$*.Po"; \
-...@am__fastdepcc_true@        else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
-...@am__fastdepcc_true@        fi
+...@am__fastdepcc_true@        $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo 
-c -o $@ $<
+...@am__fastdepcc_true@        mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no 
@AMDEPBACKSLASH@
-...@amdep_true@@am__fastdepCC_FALSE@   depfile='$(DEPDIR)/$*.Po' 
tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
-...@amdep_true@@am__fastdepCC_FALSE@   $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-...@am__fastdepcc_false@       $(COMPILE) -c `test -f '$<' || echo 
'$(srcdir)/'`$<
+...@amdep_true@@am__fastdepCC_FALSE@   DEPDIR=$(DEPDIR) $(CCDEPMODE) 
$(depcomp) @AMDEPBACKSLASH@
+...@am__fastdepcc_false@       $(COMPILE) -c $<
 
 .c.obj:
-...@am__fastdepcc_true@        if $(COMPILE) -MT $@ -MD -MP -MF 
"$(DEPDIR)/$*.Tpo" \
-...@am__fastdepcc_true@          -c -o $@ `if test -f '$<'; then $(CYGPATH_W) 
'$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
-...@am__fastdepcc_true@        then mv -f "$(DEPDIR)/$*.Tpo" 
"$(DEPDIR)/$*.Po"; \
-...@am__fastdepcc_true@        else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
-...@am__fastdepcc_true@        fi
+...@am__fastdepcc_true@        $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo 
-c -o $@ `$(CYGPATH_W) '$<'`
+...@am__fastdepcc_true@        mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no 
@AMDEPBACKSLASH@
-...@amdep_true@@am__fastdepCC_FALSE@   depfile='$(DEPDIR)/$*.Po' 
tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
-...@amdep_true@@am__fastdepCC_FALSE@   $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-...@am__fastdepcc_false@       $(COMPILE) -c `if test -f '$<'; then 
$(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
+...@amdep_true@@am__fastdepCC_FALSE@   DEPDIR=$(DEPDIR) $(CCDEPMODE) 
$(depcomp) @AMDEPBACKSLASH@
+...@am__fastdepcc_false@       $(COMPILE) -c `$(CYGPATH_W) '$<'`
 
 .c.lo:
-...@am__fastdepcc_true@        if $(LTCOMPILE) -MT $@ -MD -MP -MF 
"$(DEPDIR)/$*.Tpo" \
-...@am__fastdepcc_true@          -c -o $@ `test -f '$<' || echo 
'$(srcdir)/'`$<; \
-...@am__fastdepcc_true@        then mv -f "$(DEPDIR)/$*.Tpo" 
"$(DEPDIR)/$*.Plo"; \
-...@am__fastdepcc_true@        else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
-...@am__fastdepcc_true@        fi
+...@am__fastdepcc_true@        $(LTCOMPILE) -MT $@ -MD -MP -MF 
$(DEPDIR)/$*.Tpo -c -o $@ $<
+...@am__fastdepcc_true@        mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=yes 
@AMDEPBACKSLASH@
-...@amdep_true@@am__fastdepCC_FALSE@   depfile='$(DEPDIR)/$*.Plo' 
tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@
-...@amdep_true@@am__fastdepCC_FALSE@   $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-...@am__fastdepcc_false@       $(LTCOMPILE) -c -o $@ `test -f '$<' || echo 
'$(srcdir)/'`$<
-
-sndfile_resample-sndfile-resample.o: sndfile-resample.c
-...@am__fastdepcc_true@        if $(CC) $(DEFS) $(DEFAULT_INCLUDES) 
$(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sndfile_resample_CFLAGS) $(CFLAGS) -MT 
sndfile_resample-sndfile-resample.o -MD -MP -MF 
"$(DEPDIR)/sndfile_resample-sndfile-resample.Tpo" \
-...@am__fastdepcc_true@          -c -o sndfile_resample-sndfile-resample.o 
`test -f 'sndfile-resample.c' || echo '$(srcdir)/'`sndfile-resample.c; \
-...@am__fastdepcc_true@        then mv -f 
"$(DEPDIR)/sndfile_resample-sndfile-resample.Tpo" 
"$(DEPDIR)/sndfile_resample-sndfile-resample.Po"; \
-...@am__fastdepcc_true@        else rm -f 
"$(DEPDIR)/sndfile_resample-sndfile-resample.Tpo"; exit 1; \
-...@am__fastdepcc_true@        fi
-...@amdep_true@@am__fastdepCC_FALSE@   source='sndfile-resample.c' 
object='sndfile_resample-sndfile-resample.o' libtool=no @AMDEPBACKSLASH@
-...@amdep_true@@am__fastdepCC_FALSE@   
depfile='$(DEPDIR)/sndfile_resample-sndfile-resample.Po' 
tmpdepfile='$(DEPDIR)/sndfile_resample-sndfile-resample.TPo' @AMDEPBACKSLASH@
-...@amdep_true@@am__fastdepCC_FALSE@   $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-...@am__fastdepcc_false@       $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) 
$(AM_CPPFLAGS) $(CPPFLAGS) $(sndfile_resample_CFLAGS) $(CFLAGS) -c -o 
sndfile_resample-sndfile-resample.o `test -f 'sndfile-resample.c' || echo 
'$(srcdir)/'`sndfile-resample.c
-
-sndfile_resample-sndfile-resample.obj: sndfile-resample.c
-...@am__fastdepcc_true@        if $(CC) $(DEFS) $(DEFAULT_INCLUDES) 
$(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sndfile_resample_CFLAGS) $(CFLAGS) -MT 
sndfile_resample-sndfile-resample.obj -MD -MP -MF 
"$(DEPDIR)/sndfile_resample-sndfile-resample.Tpo" \
-...@am__fastdepcc_true@          -c -o sndfile_resample-sndfile-resample.obj 
`if test -f 'sndfile-resample.c'; then $(CYGPATH_W) 'sndfile-resample.c'; else 
$(CYGPATH_W) '$(srcdir)/sndfile-resample.c'; fi`; \
-...@am__fastdepcc_true@        then mv -f 
"$(DEPDIR)/sndfile_resample-sndfile-resample.Tpo" 
"$(DEPDIR)/sndfile_resample-sndfile-resample.Po"; \
-...@am__fastdepcc_true@        else rm -f 
"$(DEPDIR)/sndfile_resample-sndfile-resample.Tpo"; exit 1; \
-...@am__fastdepcc_true@        fi
-...@amdep_true@@am__fastdepCC_FALSE@   source='sndfile-resample.c' 
object='sndfile_resample-sndfile-resample.obj' libtool=no @AMDEPBACKSLASH@
-...@amdep_true@@am__fastdepCC_FALSE@   
depfile='$(DEPDIR)/sndfile_resample-sndfile-resample.Po' 
tmpdepfile='$(DEPDIR)/sndfile_resample-sndfile-resample.TPo' @AMDEPBACKSLASH@
-...@amdep_true@@am__fastdepCC_FALSE@   $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-...@am__fastdepcc_false@       $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) 
$(AM_CPPFLAGS) $(CPPFLAGS) $(sndfile_resample_CFLAGS) $(CFLAGS) -c -o 
sndfile_resample-sndfile-resample.obj `if test -f 'sndfile-resample.c'; then 
$(CYGPATH_W) 'sndfile-resample.c'; else $(CYGPATH_W) 
'$(srcdir)/sndfile-resample.c'; fi`
-
-sndfile_resample-sndfile-resample.lo: sndfile-resample.c
-...@am__fastdepcc_true@        if $(LIBTOOL) --mode=compile $(CC) $(DEFS) 
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) 
$(sndfile_resample_CFLAGS) $(CFLAGS) -MT sndfile_resample-sndfile-resample.lo 
-MD -MP -MF "$(DEPDIR)/sndfile_resample-sndfile-resample.Tpo" \
-...@am__fastdepcc_true@          -c -o sndfile_resample-sndfile-resample.lo 
`test -f 'sndfile-resample.c' || echo '$(srcdir)/'`sndfile-resample.c; \
-...@am__fastdepcc_true@        then mv -f 
"$(DEPDIR)/sndfile_resample-sndfile-resample.Tpo" 
"$(DEPDIR)/sndfile_resample-sndfile-resample.Plo"; \
-...@am__fastdepcc_true@        else rm -f 
"$(DEPDIR)/sndfile_resample-sndfile-resample.Tpo"; exit 1; \
-...@am__fastdepcc_true@        fi
-...@amdep_true@@am__fastdepCC_FALSE@   source='sndfile-resample.c' 
object='sndfile_resample-sndfile-resample.lo' libtool=yes @AMDEPBACKSLASH@
-...@amdep_true@@am__fastdepCC_FALSE@   
depfile='$(DEPDIR)/sndfile_resample-sndfile-resample.Plo' 
tmpdepfile='$(DEPDIR)/sndfile_resample-sndfile-resample.TPlo' @AMDEPBACKSLASH@
-...@amdep_true@@am__fastdepCC_FALSE@   $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-...@am__fastdepcc_false@       $(LIBTOOL) --mode=compile $(CC) $(DEFS) 
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) 
$(sndfile_resample_CFLAGS) $(CFLAGS) -c -o sndfile_resample-sndfile-resample.lo 
`test -f 'sndfile-resample.c' || echo '$(srcdir)/'`sndfile-resample.c
-
-varispeed_play-varispeed-play.o: varispeed-play.c
-...@am__fastdepcc_true@        if $(CC) $(DEFS) $(DEFAULT_INCLUDES) 
$(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(varispeed_play_CFLAGS) $(CFLAGS) -MT 
varispeed_play-varispeed-play.o -MD -MP -MF 
"$(DEPDIR)/varispeed_play-varispeed-play.Tpo" \
-...@am__fastdepcc_true@          -c -o varispeed_play-varispeed-play.o `test 
-f 'varispeed-play.c' || echo '$(srcdir)/'`varispeed-play.c; \
-...@am__fastdepcc_true@        then mv -f 
"$(DEPDIR)/varispeed_play-varispeed-play.Tpo" 
"$(DEPDIR)/varispeed_play-varispeed-play.Po"; \
-...@am__fastdepcc_true@        else rm -f 
"$(DEPDIR)/varispeed_play-varispeed-play.Tpo"; exit 1; \
-...@am__fastdepcc_true@        fi
-...@amdep_true@@am__fastdepCC_FALSE@   source='varispeed-play.c' 
object='varispeed_play-varispeed-play.o' libtool=no @AMDEPBACKSLASH@
-...@amdep_true@@am__fastdepCC_FALSE@   
depfile='$(DEPDIR)/varispeed_play-varispeed-play.Po' 
tmpdepfile='$(DEPDIR)/varispeed_play-varispeed-play.TPo' @AMDEPBACKSLASH@
-...@amdep_true@@am__fastdepCC_FALSE@   $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-...@am__fastdepcc_false@       $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) 
$(AM_CPPFLAGS) $(CPPFLAGS) $(varispeed_play_CFLAGS) $(CFLAGS) -c -o 
varispeed_play-varispeed-play.o `test -f 'varispeed-play.c' || echo 
'$(srcdir)/'`varispeed-play.c
-
-varispeed_play-varispeed-play.obj: varispeed-play.c
-...@am__fastdepcc_true@        if $(CC) $(DEFS) $(DEFAULT_INCLUDES) 
$(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(varispeed_play_CFLAGS) $(CFLAGS) -MT 
varispeed_play-varispeed-play.obj -MD -MP -MF 
"$(DEPDIR)/varispeed_play-varispeed-play.Tpo" \
-...@am__fastdepcc_true@          -c -o varispeed_play-varispeed-play.obj `if 
test -f 'varispeed-play.c'; then $(CYGPATH_W) 'varispeed-play.c'; else 
$(CYGPATH_W) '$(srcdir)/varispeed-play.c'; fi`; \
-...@am__fastdepcc_true@        then mv -f 
"$(DEPDIR)/varispeed_play-varispeed-play.Tpo" 
"$(DEPDIR)/varispeed_play-varispeed-play.Po"; \
-...@am__fastdepcc_true@        else rm -f 
"$(DEPDIR)/varispeed_play-varispeed-play.Tpo"; exit 1; \
-...@am__fastdepcc_true@        fi
-...@amdep_true@@am__fastdepCC_FALSE@   source='varispeed-play.c' 
object='varispeed_play-varispeed-play.obj' libtool=no @AMDEPBACKSLASH@
-...@amdep_true@@am__fastdepCC_FALSE@   
depfile='$(DEPDIR)/varispeed_play-varispeed-play.Po' 
tmpdepfile='$(DEPDIR)/varispeed_play-varispeed-play.TPo' @AMDEPBACKSLASH@
-...@amdep_true@@am__fastdepCC_FALSE@   $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-...@am__fastdepcc_false@       $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) 
$(AM_CPPFLAGS) $(CPPFLAGS) $(varispeed_play_CFLAGS) $(CFLAGS) -c -o 
varispeed_play-varispeed-play.obj `if test -f 'varispeed-play.c'; then 
$(CYGPATH_W) 'varispeed-play.c'; else $(CYGPATH_W) 
'$(srcdir)/varispeed-play.c'; fi`
-
-varispeed_play-varispeed-play.lo: varispeed-play.c
-...@am__fastdepcc_true@        if $(LIBTOOL) --mode=compile $(CC) $(DEFS) 
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) 
$(varispeed_play_CFLAGS) $(CFLAGS) -MT varispeed_play-varispeed-play.lo -MD -MP 
-MF "$(DEPDIR)/varispeed_play-varispeed-play.Tpo" \
-...@am__fastdepcc_true@          -c -o varispeed_play-varispeed-play.lo `test 
-f 'varispeed-play.c' || echo '$(srcdir)/'`varispeed-play.c; \
-...@am__fastdepcc_true@        then mv -f 
"$(DEPDIR)/varispeed_play-varispeed-play.Tpo" 
"$(DEPDIR)/varispeed_play-varispeed-play.Plo"; \
-...@am__fastdepcc_true@        else rm -f 
"$(DEPDIR)/varispeed_play-varispeed-play.Tpo"; exit 1; \
-...@am__fastdepcc_true@        fi
-...@amdep_true@@am__fastdepCC_FALSE@   source='varispeed-play.c' 
object='varispeed_play-varispeed-play.lo' libtool=yes @AMDEPBACKSLASH@
-...@amdep_true@@am__fastdepCC_FALSE@   
depfile='$(DEPDIR)/varispeed_play-varispeed-play.Plo' 
tmpdepfile='$(DEPDIR)/varispeed_play-varispeed-play.TPlo' @AMDEPBACKSLASH@
-...@amdep_true@@am__fastdepCC_FALSE@   $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-...@am__fastdepcc_false@       $(LIBTOOL) --mode=compile $(CC) $(DEFS) 
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) 
$(varispeed_play_CFLAGS) $(CFLAGS) -c -o varispeed_play-varispeed-play.lo `test 
-f 'varispeed-play.c' || echo '$(srcdir)/'`varispeed-play.c
-
-varispeed_play-audio_out.o: audio_out.c
-...@am__fastdepcc_true@        if $(CC) $(DEFS) $(DEFAULT_INCLUDES) 
$(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(varispeed_play_CFLAGS) $(CFLAGS) -MT 
varispeed_play-audio_out.o -MD -MP -MF "$(DEPDIR)/varispeed_play-audio_out.Tpo" 
\
-...@am__fastdepcc_true@          -c -o varispeed_play-audio_out.o `test -f 
'audio_out.c' || echo '$(srcdir)/'`audio_out.c; \
-...@am__fastdepcc_true@        then mv -f 
"$(DEPDIR)/varispeed_play-audio_out.Tpo" 
"$(DEPDIR)/varispeed_play-audio_out.Po"; \
-...@am__fastdepcc_true@        else rm -f 
"$(DEPDIR)/varispeed_play-audio_out.Tpo"; exit 1; \
-...@am__fastdepcc_true@        fi
-...@amdep_true@@am__fastdepCC_FALSE@   source='audio_out.c' 
object='varispeed_play-audio_out.o' libtool=no @AMDEPBACKSLASH@
-...@amdep_true@@am__fastdepCC_FALSE@   
depfile='$(DEPDIR)/varispeed_play-audio_out.Po' 
tmpdepfile='$(DEPDIR)/varispeed_play-audio_out.TPo' @AMDEPBACKSLASH@
-...@amdep_true@@am__fastdepCC_FALSE@   $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-...@am__fastdepcc_false@       $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) 
$(AM_CPPFLAGS) $(CPPFLAGS) $(varispeed_play_CFLAGS) $(CFLAGS) -c -o 
varispeed_play-audio_out.o `test -f 'audio_out.c' || echo 
'$(srcdir)/'`audio_out.c
-
-varispeed_play-audio_out.obj: audio_out.c
-...@am__fastdepcc_true@        if $(CC) $(DEFS) $(DEFAULT_INCLUDES) 
$(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(varispeed_play_CFLAGS) $(CFLAGS) -MT 
varispeed_play-audio_out.obj -MD -MP -MF 
"$(DEPDIR)/varispeed_play-audio_out.Tpo" \
-...@am__fastdepcc_true@          -c -o varispeed_play-audio_out.obj `if test 
-f 'audio_out.c'; then $(CYGPATH_W) 'audio_out.c'; else $(CYGPATH_W) 
'$(srcdir)/audio_out.c'; fi`; \
-...@am__fastdepcc_true@        then mv -f 
"$(DEPDIR)/varispeed_play-audio_out.Tpo" 
"$(DEPDIR)/varispeed_play-audio_out.Po"; \
-...@am__fastdepcc_true@        else rm -f 
"$(DEPDIR)/varispeed_play-audio_out.Tpo"; exit 1; \
-...@am__fastdepcc_true@        fi
-...@amdep_true@@am__fastdepCC_FALSE@   source='audio_out.c' 
object='varispeed_play-audio_out.obj' libtool=no @AMDEPBACKSLASH@
-...@amdep_true@@am__fastdepCC_FALSE@   
depfile='$(DEPDIR)/varispeed_play-audio_out.Po' 
tmpdepfile='$(DEPDIR)/varispeed_play-audio_out.TPo' @AMDEPBACKSLASH@
-...@amdep_true@@am__fastdepCC_FALSE@   $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-...@am__fastdepcc_false@       $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) 
$(AM_CPPFLAGS) $(CPPFLAGS) $(varispeed_play_CFLAGS) $(CFLAGS) -c -o 
varispeed_play-audio_out.obj `if test -f 'audio_out.c'; then $(CYGPATH_W) 
'audio_out.c'; else $(CYGPATH_W) '$(srcdir)/audio_out.c'; fi`
-
-varispeed_play-audio_out.lo: audio_out.c
-...@am__fastdepcc_true@        if $(LIBTOOL) --mode=compile $(CC) $(DEFS) 
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) 
$(varispeed_play_CFLAGS) $(CFLAGS) -MT varispeed_play-audio_out.lo -MD -MP -MF 
"$(DEPDIR)/varispeed_play-audio_out.Tpo" \
-...@am__fastdepcc_true@          -c -o varispeed_play-audio_out.lo `test -f 
'audio_out.c' || echo '$(srcdir)/'`audio_out.c; \
-...@am__fastdepcc_true@        then mv -f 
"$(DEPDIR)/varispeed_play-audio_out.Tpo" 
"$(DEPDIR)/varispeed_play-audio_out.Plo"; \
-...@am__fastdepcc_true@        else rm -f 
"$(DEPDIR)/varispeed_play-audio_out.Tpo"; exit 1; \
-...@am__fastdepcc_true@        fi
-...@amdep_true@@am__fastdepCC_FALSE@   source='audio_out.c' 
object='varispeed_play-audio_out.lo' libtool=yes @AMDEPBACKSLASH@
-...@amdep_true@@am__fastdepCC_FALSE@   
depfile='$(DEPDIR)/varispeed_play-audio_out.Plo' 
tmpdepfile='$(DEPDIR)/varispeed_play-audio_out.TPlo' @AMDEPBACKSLASH@
-...@amdep_true@@am__fastdepCC_FALSE@   $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-...@am__fastdepcc_false@       $(LIBTOOL) --mode=compile $(CC) $(DEFS) 
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) 
$(varispeed_play_CFLAGS) $(CFLAGS) -c -o varispeed_play-audio_out.lo `test -f 
'audio_out.c' || echo '$(srcdir)/'`audio_out.c
+...@amdep_true@@am__fastdepCC_FALSE@   DEPDIR=$(DEPDIR) $(CCDEPMODE) 
$(depcomp) @AMDEPBACKSLASH@
+...@am__fastdepcc_false@       $(LTCOMPILE) -c -o $@ $<
 
 mostlyclean-libtool:
        -rm -f *.lo
@@ -411,26 +343,15 @@
 clean-libtool:
        -rm -rf .libs _libs
 
-distclean-libtool:
-       -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 \
            if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
          done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
+         $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
        mkid -fID $$unique
+tags: TAGS
 
 TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
                $(TAGS_FILES) $(LISP)
@@ -440,23 +361,23 @@
        unique=`for i in $$list; do \
            if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
          done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       test -z "$(ETAGS_ARGS)$$tags$$unique" \
-         || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-            $$tags $$unique
-
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+         test -n "$$unique" || unique=$$empty_fix; \
+         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+           $$tags $$unique; \
+       fi
 ctags: CTAGS
 CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
                $(TAGS_FILES) $(LISP)
        tags=; \
-       here=`pwd`; \
        list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
        unique=`for i in $$list; do \
            if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
          done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
        test -z "$(CTAGS_ARGS)$$tags$$unique" \
          || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
             $$tags $$unique
@@ -468,28 +389,23 @@
 
 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)
-       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-       list='$(DISTFILES)'; for file in $$list; do \
-         case $$file in \
-           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-           $(top_srcdir)/*) file=`echo "$$file" | sed 
"s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-         esac; \
+       @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; \
-         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-           dir="/$$dir"; \
-           $(mkinstalldirs) "$(distdir)$$dir"; \
-         else \
-           dir=''; \
-         fi; \
          if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
              cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
            fi; \
@@ -503,9 +419,10 @@
 check-am: all-am
 check: check-am
 all-am: Makefile $(PROGRAMS)
-
 installdirs:
-       $(mkinstalldirs) $(DESTDIR)$(bindir)
+       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
@@ -525,7 +442,7 @@
 clean-generic:
 
 distclean-generic:
-       -rm -f $(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"
@@ -539,24 +456,34 @@
        -rm -rf ./$(DEPDIR)
        -rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
-       distclean-libtool distclean-tags
+       distclean-tags
 
 dvi: dvi-am
 
 dvi-am:
 
+html: html-am
+
 info: info-am
 
 info-am:
 
 install-data-am:
 
+install-dvi: install-dvi-am
+
 install-exec-am: install-binPROGRAMS
 
+install-html: install-html-am
+
 install-info: install-info-am
 
 install-man:
 
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -577,19 +504,23 @@
 
 ps-am:
 
-uninstall-am: uninstall-binPROGRAMS uninstall-info-am
+uninstall-am: uninstall-binPROGRAMS
+
+.MAKE: install-am install-strip
 
 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
        clean-generic clean-libtool clean-noinstPROGRAMS ctags \
-       distclean distclean-compile distclean-generic distclean-libtool \
-       distclean-tags distdir dvi dvi-am info info-am install \
-       install-am install-binPROGRAMS install-data install-data-am \
-       install-exec install-exec-am install-info install-info-am \
-       install-man install-strip installcheck installcheck-am \
-       installdirs maintainer-clean maintainer-clean-generic \
-       mostlyclean mostlyclean-compile mostlyclean-generic \
-       mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
-       uninstall-am uninstall-binPROGRAMS uninstall-info-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 uninstall uninstall-am uninstall-binPROGRAMS
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.

Index: varispeed-play.c
===================================================================
RCS file: /cvsroot/audacity/lib-src/libsamplerate/examples/varispeed-play.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- varispeed-play.c    26 Oct 2005 09:13:47 -0000      1.3
+++ varispeed-play.c    14 Feb 2009 22:13:50 -0000      1.4
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 2002-2004 Erik de Castro Lopo <[email protected]>
+** Copyright (C) 2002-2008 Erik de Castro Lopo <[email protected]>
 **
 ** This program is free software; you can redistribute it and/or modify
 ** it under the terms of the GNU General Public License as published by
@@ -280,11 +280,3 @@
 
 #endif
 
-/*
-** Do not edit or modify anything in this comment block.
-** The arch-tag line is a file identity tag for the GNU Arch 
-** revision control system.
-**
-** arch-tag: 598a9e5d-b4cd-4c16-9cce-1dc5808a804c
-*/
-

Index: audio_out.h
===================================================================
RCS file: /cvsroot/audacity/lib-src/libsamplerate/examples/audio_out.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- audio_out.h 26 Oct 2005 09:13:47 -0000      1.3
+++ audio_out.h 14 Feb 2009 22:13:50 -0000      1.4
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 1999-2003 Erik de Castro Lopo <[email protected]>
+** Copyright (C) 1999-2008 Erik de Castro Lopo <[email protected]>
 **
 ** This program is free software; you can redistribute it and/or modify
 ** it under the terms of the GNU General Public License as published by
@@ -34,11 +34,4 @@
 void audio_play (get_audio_callback_t callback, AUDIO_OUT *audio_out, void 
*callback_data) ;
 
 void audio_close (AUDIO_OUT *audio_data) ;
-/*
-** Do not edit or modify anything in this comment block.
-** The arch-tag line is a file identity tag for the GNU Arch 
-** revision control system.
-**
-** arch-tag: c5ac2ced-4e3a-480b-b9d5-4d51e2c090fa
-*/
 

--- NEW FILE: timewarp-file.c ---
/*
** Copyright (C) 2005-2008 Erik de Castro Lopo <[email protected]>
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*/

#include "config.h"

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <math.h>

#if (HAVE_SNDFILE)

#include <samplerate.h>
#include <sndfile.h>

#define ARRAY_LEN(x)    ((int) (sizeof (x) / sizeof ((x) [0])))

#define DEFAULT_CONVERTER       SRC_SINC_MEDIUM_QUALITY

#define BUFFER_LEN                      1024
#define INPUT_STEP_SIZE         8

typedef struct
{       sf_count_t      index ;
        double          ratio ;
} TIMEWARP_FACTOR ;

static void usage_exit (const char *progname) ;
static sf_count_t timewarp_convert (SNDFILE *infile, SNDFILE *outfile, int 
converter, int channels) ;

int
main (int argc, char *argv [])
{       SNDFILE *infile, *outfile ;
        SF_INFO sfinfo ;
        sf_count_t      count ;

        if (argc != 3)
                usage_exit (argv [0]) ;

        putchar ('\n') ;
        printf ("Input File    : %s\n", argv [argc - 2]) ;
        if ((infile = sf_open (argv [argc - 2], SFM_READ, &sfinfo)) == NULL)
        {       printf ("Error : Not able to open input file '%s'\n", argv 
[argc - 2]) ;
                exit (1) ;
                } ;

        if (INPUT_STEP_SIZE * sfinfo.channels > BUFFER_LEN)
        {       printf ("\n\nError : INPUT_STEP_SIZE * sfinfo.channels > 
BUFFER_LEN\n\n") ;
                exit (1) ;
                } ;


        /* Delete the output file length to zero if already exists. */
        remove (argv [argc - 1]) ;

        if ((outfile = sf_open (argv [argc - 1], SFM_WRITE, &sfinfo)) == NULL)
        {       printf ("Error : Not able to open output file '%s'\n", argv 
[argc - 1]) ;
                sf_close (infile) ;
                exit (1) ;
                } ;

        sf_command (outfile, SFC_SET_CLIPPING, NULL, SF_TRUE) ;

        printf ("Output file   : %s\n", argv [argc - 1]) ;
        printf ("Converter     : %s\n", src_get_name (DEFAULT_CONVERTER)) ;

        count = timewarp_convert (infile, outfile, DEFAULT_CONVERTER, 
sfinfo.channels) ;

        printf ("Output Frames : %ld\n\n", (long) count) ;

        sf_close (infile) ;
        sf_close (outfile) ;

        return 0 ;
} /* main */

/*==============================================================================
*/

static TIMEWARP_FACTOR warp [] =
{       {       0               , 1.00000001 },
        {       20000   , 1.01000000 },
        {       20200   , 1.00000001 },
        {       40000   , 1.20000000 },
        {       40300   , 1.00000001 },
        {       60000   , 1.10000000 },
        {       60400   , 1.00000001 },
        {       80000   , 1.50000000 },
        {       81000   , 1.00000001 },
} ;

static sf_count_t
timewarp_convert (SNDFILE *infile, SNDFILE *outfile, int converter, int 
channels)
{       static float input [BUFFER_LEN] ;
        static float output [BUFFER_LEN] ;

        SRC_STATE       *src_state ;
        SRC_DATA        src_data ;
        int                     error, warp_index = 0 ;
        sf_count_t      input_count = 0, output_count = 0 ;

        sf_seek (infile, 0, SEEK_SET) ;
        sf_seek (outfile, 0, SEEK_SET) ;

        /* Initialize the sample rate converter. */
        if ((src_state = src_new (converter, channels, &error)) == NULL)
        {       printf ("\n\nError : src_new() failed : %s.\n\n", src_strerror 
(error)) ;
                exit (1) ;
                } ;

        src_data.end_of_input = 0 ; /* Set this later. */

        /* Start with zero to force load in while loop. */
        src_data.input_frames = 0 ;
        src_data.data_in = input ;

        if (warp [0].index > 0)
                src_data.src_ratio = 1.0 ;
        else
        {       src_data.src_ratio = warp [0].ratio ;
                warp_index ++ ;
                } ;

        src_data.data_out = output ;
        src_data.output_frames = BUFFER_LEN /channels ;

        while (1)
        {
                if (warp_index < ARRAY_LEN (warp) - 1 && input_count >= warp 
[warp_index].index)
                {       src_data.src_ratio = warp [warp_index].ratio ;
                        warp_index ++ ;
                        } ;

                /* If the input buffer is empty, refill it. */
                if (src_data.input_frames == 0)
                {       src_data.input_frames = sf_readf_float (infile, input, 
INPUT_STEP_SIZE) ;
                        input_count += src_data.input_frames ;
                        src_data.data_in = input ;

                        /* The last read will not be a full buffer, so 
snd_of_input. */
                        if (src_data.input_frames < INPUT_STEP_SIZE)
                                src_data.end_of_input = SF_TRUE ;
                        } ;

                /* Process current block. */
                if ((error = src_process (src_state, &src_data)))
                {       printf ("\nError : %s\n", src_strerror (error)) ;
                        exit (1) ;
                        } ;

                /* Terminate if done. */
                if (src_data.end_of_input && src_data.output_frames_gen == 0)
                        break ;

                /* Write output. */
                sf_writef_float (outfile, output, src_data.output_frames_gen) ;
                output_count += src_data.output_frames_gen ;

                src_data.data_in += src_data.input_frames_used * channels ;
                src_data.input_frames -= src_data.input_frames_used ;
                } ;

        src_state = src_delete (src_state) ;

        return output_count ;
} /* timewarp_convert */

/*------------------------------------------------------------------------------
*/

static void
usage_exit (const char *progname)
{       const char      *cptr ;

        if ((cptr = strrchr (progname, '/')) != NULL)
                progname = cptr + 1 ;

        if ((cptr = strrchr (progname, '\\')) != NULL)
                progname = cptr + 1 ;

        printf ("\n"
                "  A program demonstrating the time warping capabilities of 
libsamplerate."
                "  It uses libsndfile for file I/O and Secret Rabbit Code (aka 
libsamplerate)"
                "  for performing the warping.\n"
                "  It works on any file format supported by libsndfile with any 
\n"
                "  number of channels (limited only by host memory).\n"
                "\n"
                "  The warping is dependant on a table hard code into the 
source code.\n"
                "\n"
                "  libsamplerate version : %s\n"
                "\n"
                "  Usage : \n"
                "       %s <input file> <output file>\n"
                "\n", src_get_version (), progname) ;

        puts ("") ;

        exit (1) ;
} /* usage_exit */

/*==============================================================================
*/

#else /* (HAVE_SNFILE == 0) */

/* Alternative main function when libsndfile is not available. */

int
main (void)
{       puts (
                "\n"
                
"****************************************************************\n"
                "  This example program was compiled without libsndfile \n"
                "  (http://www.mega-nerd.com/libsndfile/).\n"
                "  It is therefore completely broken and non-functional.\n"
                
"****************************************************************\n"
                "\n"
                ) ;

        return 0 ;
} /* main */

#endif


Index: Makefile.am
===================================================================
RCS file: /cvsroot/audacity/lib-src/libsamplerate/examples/Makefile.am,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- Makefile.am 26 Oct 2005 09:13:47 -0000      1.3
+++ Makefile.am 14 Feb 2009 22:13:50 -0000      1.4
@@ -3,7 +3,7 @@
 
 bin_PROGRAMS = sndfile-resample
 
-noinst_PROGRAMS = varispeed-play
+noinst_PROGRAMS = varispeed-play timewarp-file
 
 SAMPLERATEDIR =../src
 INCLUDES = -I$(srcdir)/$(SAMPLERATEDIR) @OS_SPECIFIC_INCLUDES@
@@ -11,22 +11,16 @@
 OS_SPECIFIC_LINKS = @OS_SPECIFIC_LINKS@
 
 SNDFILE_LIBS = @SNDFILE_LIBS@
+AM_CFLAGS = @SNDFILE_CFLAGS@
 
 
#===============================================================================
 
 sndfile_resample_SOURCES = sndfile-resample.c
-sndfile_resample_CFLAGS = @SNDFILE_CFLAGS@
 sndfile_resample_LDADD = $(SAMPLERATEDIR)/libsamplerate.la $(SNDFILE_LIBS)
 
 varispeed_play_SOURCES = varispeed-play.c audio_out.c audio_out.h
-varispeed_play_CFLAGS = @SNDFILE_CFLAGS@
 varispeed_play_LDADD = $(SAMPLERATEDIR)/libsamplerate.la $(SNDFILE_LIBS) 
$(OS_SPECIFIC_LINKS)
 
-
-
-## Do not edit or modify anything in this comment block.
-## The arch-tag line is a file identity tag for the GNU Arch 
-## revision control system.
-##
-## arch-tag: 25f669d6-3eeb-4093-8c16-2b03df642795
+timewarp_file_SOURCES = timewarp-file.c
+timewarp_file_LDADD = $(SAMPLERATEDIR)/libsamplerate.la $(SNDFILE_LIBS)
 


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs

Reply via email to