Mercurial > hg > xmms-sid
changeset 369:4611f1194941
Make binary search bailout value a #define in xmms-sid.h
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 09 Nov 2005 05:22:05 +0000 |
parents | 3e55874170eb |
children | df6f12a00305 |
files | src/xmms-sid.h src/xs_length.c src/xs_stil.c |
diffstat | 3 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/xmms-sid.h Wed Nov 09 01:28:04 2005 +0000 +++ b/src/xmms-sid.h Wed Nov 09 05:22:05 2005 +0000 @@ -87,6 +87,7 @@ #define XS_SIDBUF_SIZE (80*1024) +#define XS_BIN_BAILOUT (32) /* Binary search bailout treshold */ #define XS_STIL_MAXENTRY (128) /* Max number of sub-songs in STIL/SLDB node */
--- a/src/xs_length.c Wed Nov 09 01:28:04 2005 +0000 +++ b/src/xs_length.c Wed Nov 09 05:22:05 2005 +0000 @@ -245,7 +245,7 @@ iQNode = (iEndNode / 2); iFound = FALSE; - while ((!iFound) && ((iEndNode - iStartNode) > 128)) { + while ((!iFound) && ((iEndNode - iStartNode) > XS_BIN_BAILOUT)) { r = xs_sldb_cmphash(pHash, db->ppIndex[iQNode]->md5Hash); if (r < 0) { /* Hash was in the <- LEFT side */
--- a/src/xs_stil.c Wed Nov 09 01:28:04 2005 +0000 +++ b/src/xs_stil.c Wed Nov 09 05:22:05 2005 +0000 @@ -325,7 +325,7 @@ iQNode = (iEndNode / 2); iFound = FALSE; - while ((!iFound) && ((iEndNode - iStartNode) > 128)) { + while ((!iFound) && ((iEndNode - iStartNode) > XS_BIN_BAILOUT)) { r = strcmp(pcFilename, db->ppIndex[iQNode]->pcFilename); if (r < 0) { /* Hash was in the <- LEFT side */