--- speex-1.2~rc1.orig/libspeex/resample.c
+++ speex-1.2~rc1/libspeex/resample.c
@@ -561,8 +561,8 @@
       st->cutoff = quality_map[st->quality].downsample_bandwidth * st->den_rate / st->num_rate;
       /* FIXME: divide the numerator and denominator by a certain amount if they're too large */
       st->filt_len = st->filt_len*st->num_rate / st->den_rate;
-      /* Round down to make sure we have a multiple of 4 */
-      st->filt_len &= (~0x3);
+      /* Round up to make sure we have a multiple of 8 for SSE */
+      st->filt_len = ((st->filt_len-1)&(~0x7))+8;
       if (2*st->den_rate < st->num_rate)
          st->oversample >>= 1;
       if (4*st->den_rate < st->num_rate)
@@ -579,7 +579,7 @@
    }
    
    /* Choose the resampling type that requires the least amount of memory */
-   if (st->den_rate <= st->oversample)
+   if (st->filt_len*st->den_rate <= st->filt_len*st->oversample+8)
    {
       spx_uint32_t i;
       if (!st->sinc_table)
@@ -756,9 +756,9 @@
 #endif
    
    /* Per channel data */
-   st->last_sample = (spx_int32_t*)speex_alloc(nb_channels*sizeof(int));
-   st->magic_samples = (spx_uint32_t*)speex_alloc(nb_channels*sizeof(int));
-   st->samp_frac_num = (spx_uint32_t*)speex_alloc(nb_channels*sizeof(int));
+   st->last_sample = (spx_int32_t*)speex_alloc(nb_channels*sizeof(spx_int32_t));
+   st->magic_samples = (spx_uint32_t*)speex_alloc(nb_channels*sizeof(spx_uint32_t));
+   st->samp_frac_num = (spx_uint32_t*)speex_alloc(nb_channels*sizeof(spx_uint32_t));
    for (i=0;i<nb_channels;i++)
    {
       st->last_sample[i] = 0;
@@ -954,13 +954,15 @@
 {
    spx_uint32_t i;
    int istride_save, ostride_save;
-   spx_uint32_t bak_len = *out_len;
+   spx_uint32_t bak_out_len = *out_len;
+   spx_uint32_t bak_in_len = *in_len;
    istride_save = st->in_stride;
    ostride_save = st->out_stride;
    st->in_stride = st->out_stride = st->nb_channels;
    for (i=0;i<st->nb_channels;i++)
    {
-      *out_len = bak_len;
+      *out_len = bak_out_len;
+      *in_len = bak_in_len;
       if (in != NULL)
          speex_resampler_process_float(st, i, in+i, in_len, out+i, out_len);
       else
@@ -975,13 +977,15 @@
 {
    spx_uint32_t i;
    int istride_save, ostride_save;
-   spx_uint32_t bak_len = *out_len;
+   spx_uint32_t bak_out_len = *out_len;
+   spx_uint32_t bak_in_len = *in_len;
    istride_save = st->in_stride;
    ostride_save = st->out_stride;
    st->in_stride = st->out_stride = st->nb_channels;
    for (i=0;i<st->nb_channels;i++)
    {
-      *out_len = bak_len;
+      *out_len = bak_out_len;
+      *in_len = bak_in_len;
       if (in != NULL)
          speex_resampler_process_int(st, i, in+i, in_len, out+i, out_len);
       else
--- speex-1.2~rc1.orig/libspeex/speex_header.c
+++ speex-1.2~rc1/libspeex/speex_header.c
@@ -147,20 +147,21 @@
    int i;
    SpeexHeader *le_header;
    const char *h = "Speex   ";
-   for (i=0;i<8;i++)
-      if (packet[i]!=h[i])
-      {
-         speex_notify("This doesn't look like a Speex file");
-         return NULL;
-      }
-   
+
    /*FIXME: Do we allow larger headers?*/
    if (size < (int)sizeof(SpeexHeader))
    {
       speex_notify("Speex header too small");
       return NULL;
    }
-   
+
+   for (i=0;i<8;i++)
+      if (packet[i]!=h[i])
+      {
+         speex_notify("This doesn't look like a Speex file");
+         return NULL;
+      }
+
    le_header = (SpeexHeader*)speex_alloc(sizeof(SpeexHeader));
    
    SPEEX_COPY(le_header, (SpeexHeader*)packet, 1);
--- speex-1.2~rc1.orig/debian/speex-doc.docs
+++ speex-1.2~rc1/debian/speex-doc.docs
@@ -0,0 +1,2 @@
+doc/*.pdf
+doc/html
--- speex-1.2~rc1.orig/debian/copyright
+++ speex-1.2~rc1/debian/copyright
@@ -0,0 +1,46 @@
+This package was first debianized by A. Maitland Bottoms <bottoms@debian.org>
+on Tue, 16 Jul 2002 10:02:40 -0400.
+
+Downloaded from http://www.speex.org/
+
+Upstream authors:
+Jean-Marc Valin <jean-marc.valin@hermes.usherb.ca>
+David Rowe <david@voicetronix.com.au>
+
+Copyright 2002-2007 	Xiph.org Foundation
+Copyright 2002-2007 	Jean-Marc Valin
+Copyright 2005-2007	Analog Devices Inc.
+Copyright 2005-2007	Commonwealth Scientific and Industrial Research
+                        Organisation (CSIRO)
+Copyright 1993, 2002, 2006 David Rowe
+Copyright 2003 		EpicGames
+Copyright 1992-1994	Jutta Degener, Carsten Bormann
+
+License:
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+- Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+
+- Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+
+- Neither the name of the Xiph.org Foundation nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--- speex-1.2~rc1.orig/debian/speex.install
+++ speex-1.2~rc1/debian/speex.install
@@ -0,0 +1 @@
+usr/bin
--- speex-1.2~rc1.orig/debian/changelog
+++ speex-1.2~rc1/debian/changelog
@@ -0,0 +1,436 @@
+speex (1.2~rc1-7ubuntu2) saucy; urgency=low
+
+  * Use dh_autotools-dev to update config.{sub,guess} for new ports.
+
+ -- Adam Conrad <adconrad@ubuntu.com>  Tue, 08 Oct 2013 17:10:46 -0600
+
+speex (1.2~rc1-7ubuntu1) raring; urgency=low
+
+  * Build with float on armhf (LP: #1125295)
+
+ -- David Henningsson <david.henningsson@canonical.com>  Thu, 14 Feb 2013 16:37:04 +0100
+
+speex (1.2~rc1-7) unstable; urgency=low
+
+  * Minimal set of resampler RC fixes targeted for Wheezy.
+  * Fixes a bug with selecting the resampler with the smallest memory footprint
+    for some sample rate pairs.
+  * Fixes a bug where the filter length may not have been a multiple of 8 for
+    some sample rate pairs, as is needed for the SSE implementation to avoid
+    the SSE operations reading past the end of the buffer.
+  * Fixes a type mismatch in computing allocation sizes.  This should not be a
+    problem on any currently existing Debian arch, but it was obviously wrong,
+    and the fix is trivial and obviously right, so there's no point waiting for
+    someone to hit it before we correct this.
+  * Fixes the problem seen with some sample rate pairs if an integer number of
+    samples are not processed every frame, leading to clicking or truncation.
+    Closes: #689049
+
+ -- Ron Lee <ron@debian.org>  Sun, 04 Nov 2012 15:09:07 +1030
+
+speex (1.2~rc1-6) unstable; urgency=low
+
+  * Build for multi-arch.  Closes: #637600
+
+ -- Ron Lee <ron@debian.org>  Sun, 03 Jun 2012 06:17:12 +0930
+
+speex (1.2~rc1-5) unstable; urgency=low
+
+  * Build the fixed-point version for mips(el) too.
+    Float performance there seems suspect, at least under some conditions.
+
+ -- Ron Lee <ron@debian.org>  Wed, 23 May 2012 13:47:08 +0930
+
+speex (1.2~rc1-4) unstable; urgency=low
+
+  * Build with 'hardening' flags enabled.  Closes: #655880
+  * Check the size of the header packet before we look inside it in
+    speex_packet_to_header().  Which wasn't detected by the magic flags,
+    but was spotted in an old-fashioned by-eye code review while sanity
+    checking the new OggOpus spec.
+
+ -- Ron Lee <ron@debian.org>  Tue, 22 May 2012 07:17:03 +0930
+
+speex (1.2~rc1-3) unstable; urgency=low
+
+  * Work around extra dh_install retardedness that using a higher compat
+    level brought us.  We probably should just return to using cp instead.
+
+ -- Ron Lee <ron@debian.org>  Thu, 15 Dec 2011 00:35:26 +1030
+
+speex (1.2~rc1-2) unstable; urgency=low
+
+  * Add a -dbg package.  Closes: #646035
+  * Disable the arm4-asm optimisation for armhf, it wants to insist we use
+    thumb2 code for that.  Closes: #651578, #651846
+
+ -- Ron Lee <ron@debian.org>  Tue, 13 Dec 2011 23:09:39 +1030
+
+speex (1.2~rc1-1) unstable; urgency=low
+
+  * This one should be our release candidate for Lenny.
+  * Fixes a memory leak in the echo canceller.
+  * Less aggressive noise adaptation.
+  * Adds the channel decorrelation interface, which completes the planned
+    changes prior to freezing the 1.2 API.  This doesn't affect any existing
+    code, so the possibilities for regression are slim.
+
+ -- Ron Lee <ron@debian.org>  Thu, 24 Jul 2008 03:39:44 +0930
+
+speex (1.2~beta4-2) unstable; urgency=low
+
+  * Move the extra sse libs to /usr/lib/sse2.  That is a bit more elitist than
+    we need to be, but the linker already looks there without adding yet another
+    path permutation, and in practice most people who really care about how long
+    this is going to take won't find that sets the bar too high for them at all.
+
+    Actually, it's apparently ldconfig rather than the linker that is missing
+    this path, but this will still do for now while people figure out if or when
+    that should be fixed too.
+
+ -- Ron Lee <ron@debian.org>  Wed, 04 Jun 2008 03:48:19 +0930
+
+speex (1.2~beta4-1) unstable; urgency=low
+
+  * Upstream snapshot release.
+  * Fixes a speexdec regression causing all files to be decoded by as stereo
+  * Better support for arch specific optimisations.  We build for both sse and
+    487 on x86, and for fixed point with v4 asm for ARM.
+
+ -- Ron Lee <ron@debian.org>  Wed, 04 Jun 2008 00:40:14 +0930
+
+speex (1.2~beta3.2-1) unstable; urgency=low
+
+  * New upstream snapshot.  Reverts an accidental API change in beta3.1
+  * Conflicts with the packages known to be affected by the speexdsp split.
+    Closes: #474253
+  * Drop Uploaders that are no longer active, by request from #pkg-voip.
+  * Enable sse support for amd64.
+
+ -- Ron Lee <ron@debian.org>  Mon, 14 Apr 2008 23:22:26 +0930
+
+speex (1.2~beta3.1.ds-1) unstable; urgency=low
+
+  * Include .pc fixes accepted upstream and the upstream doxygen config
+    from their git repo source.
+  * Try to convince cdbs not to build the docs for arch specific builds...
+  * That apparently cannot be done, so it's off to the bit bucket for this
+    vile opiate of the clueless.  My patience with its stupidity is ended.
+    Closes: #474017
+
+ -- Ron Lee <ron@debian.org>  Thu, 03 Apr 2008 09:21:42 +0930
+
+speex (1.2~beta3.1-1) experimental; urgency=low
+
+  * New upstream snapshot.  Includes the API support required for mumble.
+    Closes: #467361
+  * Add a Homepage field and make the Vcs- fields less XS-ive.
+    Thanks to Patrick Matthäi for spotting this.
+
+ -- Ron Lee <ron@debian.org>  Fri, 21 Mar 2008 08:19:59 +1030
+
+speex (1.2~beta3-1) unstable; urgency=low
+
+  * New upstream release.  Splits the unstable API functions into their own
+    library.  Apps which used them previously now need to link to libspeexdsp
+    as well.
+  * Fixes "Inconsistency in preprocessor API".  Closes: #439516
+  * Add myself to uploaders, with the blessing of #debian-voip
+
+ -- Ron Lee <ron@debian.org>  Wed, 19 Mar 2008 05:49:20 +1030
+
+speex (1.2~beta2-3.1) experimental; urgency=low
+
+  * Local backport.  no texlive build dep
+
+ -- Ron Lee <ron@debian.org>  Wed, 28 Nov 2007 01:11:57 +1030
+
+speex (1.2~beta2-3) experimental; urgency=low
+
+  * debian/watch: Update.
+  * Bump soname to reflect API change.
+  * Add "This package contains Speex's documentation." to description of
+    speex-doc (Closes: #425985)
+  * Don't install misc.h.3 (Closes: #426064)
+
+ -- Kilian Krause <kilian@debian.org>  Sat, 01 Sep 2007 13:27:48 +0200
+
+speex (1.2~beta2-2) experimental; urgency=low
+
+  * Fix build-depends: doxygen needs to be listed in Build-Depends as well as
+    in Build-Depends-Indep according to policy. We don't just run the
+    build-arch and binary-arch for binary-builds, still.
+    - speex_1.2~beta2-1(experimental/powerpc/anakreon): Call of doxygen in
+    wrong target (Closes: #429188)
+  * Use ${binary:Version} for binNMU-safe uploads
+    Add dpkg-dev (>= 1.13.19) to Build-Depends
+  * Update Build-Depends on debhelper to allow use of debhelper.mk in CDBS.
+  * Ditch direct Depends of speex on libspeex1 as it'll come through CDBS
+    magic anyway.
+
+ -- Kilian Krause <kilian@debian.org>  Sat, 18 Aug 2007 22:16:45 +0200
+
+speex (1.2~beta2-1) experimental; urgency=low
+
+  * New upstream release
+  * Switch to cdbs
+    - Provide debian/compat. lintian : debian-rules-sets-DH_COMPAT
+    - Rework debian/*.install
+    - Add debian/speex-doc.manpages debian/speex-doc.docs
+    - change doxyfile OUTPUT_DIRECTORY = doc
+  * Add libspeex-dev Depends: pkg-config
+  * TeTeX transition: Add Build-Depends-Indep: texlive-extra-utils
+
+ -- Mark Purcell <msp@debian.org>  Fri, 25 May 2007 10:21:16 +0100
+
+speex (1.1.12-3) unstable; urgency=low
+
+  * Ensure proper shlibs to circumvent problems like #403544.
+
+ -- Kilian Krause <kilian@debian.org>  Wed, 27 Dec 2006 15:51:49 +0100
+
+speex (1.1.12-2) unstable; urgency=low
+
+  * Update debian/watch for numeric upstream
+  * Add Depends: ${shlibs:Depends} to speex package
+    - Fixes: Missing dependency on libogg0 (Closes: #372844)
+  * debian/rules export DH_COMPAT=4
+  * Ensure speex depends on exact version of libspeex1
+    - Fixes: undefined symbol: speex_lib_get_mode (Closes: #341787)
+
+ -- Mark Purcell <msp@debian.org>  Tue, 13 Jun 2006 04:06:23 +0100
+
+speex (1.1.12-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Mark Purcell <msp@debian.org>  Sat, 18 Feb 2006 12:22:57 +0000
+
+speex (1.1.11.1-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Mark Purcell <msp@debian.org>  Wed,  7 Dec 2005 23:22:21 +0000
+
+speex (1.1.11-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- A. Maitland Bottoms <bottoms@debian.org>  Fri, 25 Nov 2005 11:29:35 -0500
+
+speex (1.1.10-2) unstable; urgency=low
+
+  * Add debian/watch with svn-uupgrade
+
+ -- Mark Purcell <msp@debian.org>  Sun, 30 Oct 2005 21:13:44 +0000
+
+speex (1.1.10-1) unstable; urgency=low
+
+  * New upstream release (Closes: #300968)
+  * Fix two encoding bugs (Closes: #307884)
+  * Version libspeex1 depends (Closes: #306159)
+  * Use dpatch in packaging
+  * debian/patches/01_default-quality-manpage.dpatch
+    manpage reports default quality in source
+  * debian/patches/02_configurable-VAD.dpatch
+    using integer percentage argument
+  * Debian VoIP upload.
+
+ -- A. Maitland Bottoms <bottoms@debian.org>  Sat, 15 Oct 2005 16:55:56 -0400
+
+speex (1.1.6-2) unstable; urgency=low
+
+  * out of experimental for iaxclient (Closes: #292548)
+  * installs speex.pc in /usr/lib/pkgconfig (Closes: #267281)
+  * implements documented SPEEX_GET_QUALITY (Closes: #271052)
+  * update copyright file (Closes: #290207)
+  * default encoding quality is 8 (Closes: #295552)
+
+ -- A. Maitland Bottoms <bottoms@debian.org>  Sat, 26 Feb 2005 22:33:22 -0500
+
+speex (1.1.6-1) experimental; urgency=low
+
+  * New upstream release
+  * Use DESTDIR instead of prefix for make install to keep libtool from adding
+    a rpath.
+
+ -- A. Maitland Bottoms <bottoms@debian.org>  Thu, 12 Aug 2004 11:43:37 -0400
+
+speex (1.0.rel.4-0.1) unstable; urgency=low
+
+  * NMU rquested by maintainer.
+  * New upstream release.
+  * Use DESTDIR instead of prefix for make install to keep libtool from adding
+    a rpath.
+
+ -- Andreas Metzler <ametzler@debian.org>  Sat, 24 Jul 2004 18:32:00 +0200
+
+speex (1.1.5-1) experimental; urgency=low
+
+  * New upstream release
+
+ -- A. Maitland Bottoms <bottoms@debian.org>  Thu,  8 Jul 2004 08:29:31 -0400
+
+speex (1.1.3-1) experimental; urgency=low
+
+  * New upstream release
+
+ -- A. Maitland Bottoms <bottoms@debian.org>  Thu, 25 Dec 2003 09:51:49 -0500
+
+speex (1.1.2-1) experimental; urgency=low
+
+  * New upstream release
+
+ -- A. Maitland Bottoms <bottoms@debian.org>  Thu, 20 Nov 2003 00:22:40 -0500
+
+speex (1.1-1) experimental; urgency=low
+
+  * New upstream release
+
+ -- A. Maitland Bottoms <bottoms@debian.org>  Sun, 21 Sep 2003 16:04:02 -0400
+
+speex (1.0.rel.1-2) unstable; urgency=low
+
+  * Update to policy version 3.6.0
+  * Comply with policy section 8.5
+  (Closes: #197289)
+
+ -- A. Maitland Bottoms <bottoms@debian.org>  Sat, 12 Jul 2003 10:49:33 -0400
+
+speex (1.0.rel.1-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- A. Maitland Bottoms <bottoms@debian.org>  Fri,  6 Jun 2003 01:17:25 -0400
+
+speex (1.0.rel-4) unstable; urgency=low
+
+  * make use of dh_makeshlibs (Closes: #187003)
+
+ -- A. Maitland Bottoms <bottoms@debian.org>  Mon,  7 Apr 2003 17:52:48 -0400
+
+speex (1.0.rel-3) unstable; urgency=low
+
+  * libspeex-dev moves to new libdevel section
+
+ -- A. Maitland Bottoms <bottoms@debian.org>  Mon, 31 Mar 2003 17:51:01 -0500
+
+speex (1.0.rel-2) unstable; urgency=low
+
+  * Library policy: libspeex->libspeex1
+  (Closes: #187003, #187004)
+
+ -- A. Maitland Bottoms <bottoms@debian.org>  Mon, 31 Mar 2003 17:34:53 -0500
+
+speex (1.0.rel-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- A. Maitland Bottoms <bottoms@debian.org>  Mon, 24 Mar 2003 07:19:31 -0500
+
+speex (1.0.rc3-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- A. Maitland Bottoms <bottoms@debian.org>  Wed,  5 Mar 2003 21:59:13 -0500
+
+speex (1.0.rc2-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- A. Maitland Bottoms <bottoms@debian.org>  Wed, 29 Jan 2003 21:38:44 -0500
+
+speex (1.0.rc1-3) unstable; urgency=low
+
+  * libtoolize, automake, and autoconf for better mips support
+  * (closes: #177117)
+
+ -- A. Maitland Bottoms <bottoms@debian.org>  Fri, 17 Jan 2003 09:44:01 -0500
+
+speex (1.0.rc1-2) unstable; urgency=low
+
+  * fixup vbr_nb_thresh array size in vbr.[ch]
+
+ -- A. Maitland Bottoms <bottoms@debian.org>  Fri, 17 Jan 2003 00:30:07 -0500
+
+speex (1.0.rc1-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- A. Maitland Bottoms <bottoms@debian.org>  Thu, 16 Jan 2003 23:27:05 -0500
+
+speex (1.0.beta4-1) unstable; urgency=low
+
+  * New upstream release
+  * Now with VAD - Voice Activity Detection and 
+    DTX - Discontinuous Transmission
+
+ -- A. Maitland Bottoms <bottoms@debian.org>  Fri, 20 Dec 2002 17:53:02 -0500
+
+speex (1.0.beta3-1) unstable; urgency=low
+
+  * New upstream release
+  * These last new features before 1.0 are a new "ultra-wideband"
+    mode for encoding at 32 kHz (up to 48 kHz) and an intensity stereo mode.
+
+ -- A. Maitland Bottoms <bottoms@debian.org>  Mon, 11 Nov 2002 08:15:08 -0500
+
+speex (1.0.beta2-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- A. Maitland Bottoms <bottoms@debian.org>  Mon, 28 Oct 2002 16:32:30 -0500
+
+speex (1.0.beta1+-3) unstable; urgency=low
+
+  * speex depends upon libspeex (Closes: #164824)
+
+ -- A. Maitland Bottoms <bottoms@debian.org>  Tue, 15 Oct 2002 12:09:27 -0400
+
+speex (1.0.beta1+-2) unstable; urgency=low
+
+  * Correct doxygen invocation from debian/rules
+
+ -- A. Maitland Bottoms <bottoms@debian.org>  Mon, 14 Oct 2002 19:42:55 -0400
+
+speex (1.0.beta1+-1) unstable; urgency=low
+
+  * Get the good bits in with a newer version number.
+
+ -- A. Maitland Bottoms <bottoms@debian.org>  Mon, 14 Oct 2002 18:52:54 -0400
+
+speex (1.0beta1-1) unstable; urgency=low
+
+  * builds with pbuilder and without automake now.
+  * New Debian package. (Closes: #160609)
+
+ -- A. Maitland Bottoms <bottoms@debian.org>  Sat, 12 Oct 2002 02:03:31 -0400
+
+speex (1.0.beta1-1) unstable; urgency=low
+
+  * New Debian package. (Closes: #160609)
+  * Xiph.org hosted upstream
+  * License changed to BSD
+
+ -- A. Maitland Bottoms <bottoms@debian.org>  Fri, 11 Oct 2002 13:12:08 -0400
+
+speex (0.8.1-1) unstable; urgency=low
+
+  * New Debian package. (Closes: #160609)
+  * For use by openh323 and GnomeMeeting
+  * Update to 0.8.1
+
+ -- A. Maitland Bottoms <bottoms@debian.org>  Mon, 07 Oct 2002 21:40:26 -0400
+
+speex (0.8.0-1) unstable; urgency=low
+
+  * Update to 0.8.0
+
+ -- A. Maitland Bottoms <bottoms@debian.org>  Tue,  3 Sep 2002 22:06:32 -0400
+
+speex (0.5.0-1) unstable; urgency=low
+
+  * Initial Release.
+
+ -- A. Maitland Bottoms <bottoms@debian.org>  Tue, 16 Jul 2002 22:02:40 -0400
+
--- speex-1.2~rc1.orig/debian/compat
+++ speex-1.2~rc1/debian/compat
@@ -0,0 +1 @@
+5
--- speex-1.2~rc1.orig/debian/speex-doc.doc-base
+++ speex-1.2~rc1/debian/speex-doc.doc-base
@@ -0,0 +1,15 @@
+Document: speex-docs
+Title: Speex codec and API documentation
+Author: Jean-Marc Valin, David Rowe
+Abstract: The PDF documentation describes the Speex codec and the command line
+ and C interfaces provided by the reference implementation.  The HTML docs are
+ generated by parsing the source with doxygen, to generate the most current API
+ reference documentation from it.
+Section: Programming/C
+
+Format: PDF
+Files: /usr/share/doc/speex-doc/manual.pdf.gz
+
+Format: HTML
+Index: /usr/share/doc/speex-doc/html/index.html
+Files: /usr/share/doc/speex-doc/html/*
--- speex-1.2~rc1.orig/debian/rules
+++ speex-1.2~rc1/debian/rules
@@ -0,0 +1,182 @@
+#!/usr/bin/make -f
+# Copyright Ron Lee 2003, 2004, 2007, 2008, 2012
+
+#export DH_VERBOSE=1
+export DH_OPTIONS
+
+SHELL = /bin/bash
+
+NUM_CPUS = $(shell getconf _NPROCESSORS_ONLN 2>/dev/null)
+PARALLEL = $(subst parallel=,,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+NJOBS    = -j$(or $(PARALLEL),$(NUM_CPUS),1)
+
+
+DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+
+DEB_HOST_ARCH_CPU  ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
+DEB_HOST_ARCH      ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
+DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+
+
+HARD_CPPFLAGS = -D_FORTIFY_SOURCE=2
+HARD_CFLAGS   = -Wformat=2
+HARD_LDFLAGS  = -z now
+
+ifneq (,$(filter-out $(DEB_HOST_ARCH), ia64 alpha mips mipsel hppa arm))
+	HARD_CFLAGS += -fstack-protector --param ssp-buffer-size=4
+endif
+ifneq (,$(filter-out $(DEB_HOST_ARCH), ia64 hppa avr32))
+	HARD_LDFLAGS += -z relro
+endif
+
+# Keep dpkg-buildpackage the hell out of messing with our compile flags,
+# we should trust upstream to know better than it what to use here.
+# We explicitly re-add -g and -O2 here, since not all configurations do
+# set it explicitly (and instead rely on autoconf's default of doing that,
+# which we override here when we set the hardening flags, if we do).
+CPPFLAGS = $(HARD_CPPFLAGS)
+CFLAGS   = $(HARD_CFLAGS) -g -O2
+CXXFLAGS = $(HARD_CFLAGS) -g -O2
+LDFLAGS  = $(HARD_LDFLAGS)
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+	CFLAGS = -Wall -g -O0
+endif
+ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
+	INSTALL_PROGRAM += -s
+endif
+
+
+objdir            = objs
+objdir_sse        = objs-sse
+objdir_fixedpoint = objs-fixed-point
+
+all_objs  = $(objdir) $(objdir_sse) $(objdir_fixedpoint)
+arch_objs = $(objdir)
+
+ifeq ($(DEB_HOST_ARCH_CPU),arm)
+
+ifneq ($(DEB_HOST_ARCH),armhf)
+objdir             = $(objdir_fixedpoint)
+EXTRA_CONFIG_FLAGS = --enable-arm4-asm
+endif
+
+endif
+
+ifneq (,$(filter $(DEB_HOST_ARCH), mips mipsel))
+objdir             = $(objdir_fixedpoint)
+endif
+
+ifeq ($(DEB_HOST_ARCH_CPU),i386)
+arch_objs += $(objdir_sse)
+endif
+
+
+clean:
+	dh_testdir
+	dh_testroot
+	$(RM) *-stamp
+	$(RM) -r $(all_objs) doc/{html,man,latex}
+	dh_autotools-dev_restoreconfig
+	dh_clean
+
+
+# This first empty one is equivalent to declaring it .SECONDARY while we have
+# no target specific variables to set.  We don't want it removed by default as
+# an unnamed intermediate file when the build target is completed.
+$(objdir)/config.status:
+$(objdir_sse)/config.status:        EXTRA_CONFIG_FLAGS += --enable-sse
+$(objdir_fixedpoint)/config.status: EXTRA_CONFIG_FLAGS += --enable-fixed-point
+
+%/config.status: configure
+	dh_testdir
+	dh_autotools-dev_updateconfig
+	mkdir -p $*
+	cd $* && ../configure --host=$(DEB_HOST_GNU_TYPE)	\
+			      --build=$(DEB_BUILD_GNU_TYPE)	\
+			      --prefix=/usr			\
+			      --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \
+			      $(EXTRA_CONFIG_FLAGS)		\
+			      CPPFLAGS="$(CPPFLAGS)"		\
+			      CFLAGS="$(CFLAGS)"		\
+			      CXXFLAGS="$(CXXFLAGS)"		\
+			      LDFLAGS="$(LDFLAGS)"
+
+build: build-arch build-indep
+
+build-arch: $(foreach d,$(arch_objs),build-target-$(d)-stamp)
+build-target-%-stamp : %/config.status
+	dh_testdir
+	$(MAKE) $(NJOBS) -C $*
+	touch $@
+
+build-indep: build-indep-stamp
+build-indep-stamp:
+	dh_testdir
+	doxygen Doxyfile
+	touch $@
+
+
+install: install-arch install-indep
+
+install-arch: install-arch-stamp
+install-arch-stamp: build-arch
+	dh_testdir
+	cd $(objdir) && $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
+
+	if [ -d "$(objdir_sse)" ]; then \
+	    dh_install -plibspeex1    $(objdir_sse)/libspeex/.libs/libspeex.so.* \
+				      usr/lib/$(DEB_HOST_MULTIARCH)/sse2; \
+	    dh_install -plibspeexdsp1 $(objdir_sse)/libspeex/.libs/libspeexdsp.so.* \
+				      usr/lib/$(DEB_HOST_MULTIARCH)/sse2; \
+	fi
+
+	dh_install -plibspeex1    $(objdir)/libspeex/.libs/libspeex.so.* \
+				  usr/lib/$(DEB_HOST_MULTIARCH)
+
+	dh_install -plibspeexdsp1 $(objdir)/libspeex/.libs/libspeexdsp.so.* \
+				  usr/lib/$(DEB_HOST_MULTIARCH)
+
+	dh_install -plibspeex-dev -plibspeexdsp-dev -pspeex --sourcedir=debian/tmp
+	touch $@
+
+install-indep: build-indep
+
+
+binary: binary-indep binary-arch
+
+binary-indep: DH_OPTIONS = -i
+binary-indep: install-indep
+	dh_testdir
+	dh_testroot
+	dh_installdocs
+	dh_installchangelogs
+	dh_compress
+	dh_fixperms
+	dh_installdeb
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+binary-arch: install-arch
+	dh_testdir
+	dh_testroot
+	dh_installdocs -a
+	dh_installman -a
+	dh_installchangelogs -a
+	dh_strip -a --dbg-package=libspeex-dbg
+	dh_compress -a
+	dh_fixperms -a
+	dh_makeshlibs -plibspeex1 -V"libspeex1 (>= 1.2~beta3-1)"
+	dh_makeshlibs -plibspeexdsp1 -V"libspeexdsp1 (>= 1.2~beta3.2-1)"
+	dh_installdeb -a
+	dh_shlibdeps -a
+	dh_gencontrol -a
+	dh_md5sums -a
+	dh_builddeb -a
+
+
+.PHONY: clean build build-arch build-indep install install-arch install-indep \
+	binary binary-arch binary-indep
+
--- speex-1.2~rc1.orig/debian/control
+++ speex-1.2~rc1/debian/control
@@ -0,0 +1,108 @@
+Source: speex
+Section: sound
+Priority: optional
+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
+XSBC-Original-Maintainer: Ron Lee <ron@debian.org>
+Build-Depends: debhelper (>= 8.1.3), libogg-dev, dpkg-dev (>= 1.13.19), autotools-dev
+Build-Depends-Indep: doxygen, graphviz
+Standards-Version: 3.9.3.1
+Homepage: http://www.speex.org/
+Vcs-Git: git://git.debian.org/users/ron/speex.git
+Vcs-Browser: http://git.debian.org/?p=users/ron/speex.git;a=summary
+
+Package: speex
+Architecture: any
+Multi-Arch: foreign
+Depends: ${shlibs:Depends}
+Description: The Speex codec command line tools
+ Speex is an audio codec especially designed for compressing voice at low
+ bit-rates for applications such as voice over IP (VoIP). In some senses,
+ it is meant to be complementary to the Vorbis codec which places a greater
+ emphasis on high-quality music reproduction.
+ .
+ This package contains the encoder and decoder command-line applications.
+
+Package: libspeex1
+Architecture: any
+Multi-Arch: same
+Section: libs
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${shlibs:Depends}
+Suggests: speex
+Conflicts: libopal-2.2 (<= 2.2.11~dfsg1-3),
+           libopal-2.2-develop (<= 2.2.11~dfsg1-3),
+           libopal-2.2-ptrace (<= 2.2.11~dfsg1-3),
+           libopal-2.2.0,
+           libiaxclient1 (<= 2.0.2-1),
+           asterisk (<=1:1.4.18.1~dfsg-1),
+           libmediastreamer0 (<= 2.1.0-1)
+Description: The Speex codec runtime library
+ Speex is an audio codec especially designed for compressing voice at low
+ bit-rates for applications such as voice over IP (VoIP). In some senses,
+ it is meant to be complementary to the Vorbis codec which places a greater
+ emphasis on high-quality music reproduction.
+ .
+ This package provides the speex runtime library.
+
+Package: libspeex-dev
+Architecture: any
+Multi-Arch: same
+Section: libdevel
+Depends: libspeex1 (= ${binary:Version})
+Suggests: pkg-config
+Description: The Speex codec library development files
+ Speex is an audio codec especially designed for compressing voice at low
+ bit-rates for applications such as voice over IP (VoIP). In some senses,
+ it is meant to be complementary to the Vorbis codec which places a greater
+ emphasis on high-quality music reproduction.
+ .
+ This package provides the speex library headers and development files.
+
+Package: libspeexdsp1
+Architecture: any
+Multi-Arch: same
+Section: libs
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${shlibs:Depends}
+Description: The Speex extended runtime library
+ Speex is an audio codec especially designed for compressing voice at low
+ bit-rates for applications such as voice over IP (VoIP). In some senses,
+ it is meant to be complementary to the Vorbis codec which places a greater
+ emphasis on high-quality music reproduction.
+ .
+ This package provides the runtime library of additional functions that
+ are part of the Speex distribution.
+
+Package: libspeexdsp-dev
+Architecture: any
+Multi-Arch: same
+Section: libdevel
+Depends: libspeexdsp1 (= ${binary:Version}), libspeex-dev (= ${binary:Version})
+Suggests: pkg-config
+Description: The Speex extended library development files
+ Speex is an audio codec especially designed for compressing voice at low
+ bit-rates for applications such as voice over IP (VoIP). In some senses,
+ it is meant to be complementary to the Vorbis codec which places a greater
+ emphasis on high-quality music reproduction.
+ .
+ This package provides the speex extended library headers and development files.
+
+Package: speex-doc
+Architecture: all
+Section: doc
+Suggests: speex
+Description: Documentation for speex
+ Speex is an audio codec especially designed for compressing voice at low
+ bit-rates for applications such as voice over IP (VoIP). In some senses,
+ it is meant to be complementary to the Vorbis codec which places a greater
+ emphasis on high-quality music reproduction.
+ .
+ This package contains the Speex documentation.
+
+Package: libspeex-dbg
+Section: debug
+Priority: extra
+Architecture: any
+Depends: libspeex1 (= ${binary:Version}), libspeexdsp1 (= ${binary:Version})
+Description: debugging symbols for libspeex and libspeexdsp
+ This package provides the detached debug symbols for those libraries.
--- speex-1.2~rc1.orig/debian/speex.manpages
+++ speex-1.2~rc1/debian/speex.manpages
@@ -0,0 +1 @@
+src/*.1
--- speex-1.2~rc1.orig/debian/speex-doc.manpages
+++ speex-1.2~rc1/debian/speex-doc.manpages
@@ -0,0 +1 @@
+doc/man/man3/*
--- speex-1.2~rc1.orig/debian/libspeexdsp-dev.install
+++ speex-1.2~rc1/debian/libspeexdsp-dev.install
@@ -0,0 +1,8 @@
+usr/include/speex/speex_buffer.h
+usr/include/speex/speex_echo.h
+usr/include/speex/speex_jitter.h
+usr/include/speex/speex_preprocess.h
+usr/include/speex/speex_resampler.h
+usr/lib/*/libspeexdsp.a
+usr/lib/*/libspeexdsp.so
+usr/lib/*/pkgconfig/speexdsp.pc
--- speex-1.2~rc1.orig/debian/docs
+++ speex-1.2~rc1/debian/docs
@@ -0,0 +1,4 @@
+AUTHORS
+NEWS
+README
+TODO
--- speex-1.2~rc1.orig/debian/libspeex-dev.install
+++ speex-1.2~rc1/debian/libspeex-dev.install
@@ -0,0 +1,10 @@
+usr/include/speex/speex.h
+usr/include/speex/speex_bits.h
+usr/include/speex/speex_callbacks.h
+usr/include/speex/speex_config_types.h
+usr/include/speex/speex_header.h
+usr/include/speex/speex_stereo.h
+usr/include/speex/speex_types.h
+usr/lib/*/libspeex.a
+usr/lib/*/libspeex.so
+usr/lib/*/pkgconfig/speex.pc