summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonty <xiphmont@xiph.org>2000-04-06 15:01:20 +0000
committerMonty <xiphmont@xiph.org>2000-04-06 15:01:20 +0000
commit53c9bd97a70ba35ad99954d7ea0422de8f44ac19 (patch)
tree503cf63631a109b7a71c78024e56428626ad401d
parent5b634bdf8ca2013d31e44caeeb3befe007678cbd (diff)
downloadlibvorbis-git-53c9bd97a70ba35ad99954d7ea0422de8f44ac19.tar.gz
Fix for the sort comparison bug Vakor found.
Monty svn path=/trunk/vorbis/; revision=304
-rw-r--r--lib/lsp.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/lsp.c b/lib/lsp.c
index a893d32d..b50d5777 100644
--- a/lib/lsp.c
+++ b/lib/lsp.c
@@ -12,7 +12,7 @@
********************************************************************
function: LSP (also called LSF) conversion routines
- last mod: $Id: lsp.c,v 1.5 2000/03/10 13:21:18 xiphmont Exp $
+ last mod: $Id: lsp.c,v 1.6 2000/04/06 15:01:20 xiphmont Exp $
The LSP generation code is taken (with minimal modification) from
"On the Computation of the LSP Frequencies" by Joseph Rothweiler
@@ -100,7 +100,10 @@ static void kw(double *r,int n) {
static int comp(const void *a,const void *b){
- return(*(double *)a<*(double *)b);
+ if(*(double *)a<*(double *)b)
+ return(-1);
+ else
+ return(1);
}
/* CACM algorithm 283. */