Mercurial > hg > audiodb
comparison sample.cpp @ 324:c93be2f3a674
Merge of branches/large_adb -r 514:524 onto the trunk. No conflicts. Added LARGE_ADB support. Turn on with --ntracks 20001 or greater. Use --adb_feature_root to locate feature files at QUERY time. A bug fix in LSH indexing that was incorrectly thresholding large numbers of shingles.
author | mas01mc |
---|---|
date | Thu, 21 Aug 2008 21:28:33 +0000 |
parents | cacad987d785 |
children | 521812d63516 |
comparison
equal
deleted
inserted
replaced
315:d2c56d4f841e | 324:c93be2f3a674 |
---|---|
54 return 0; | 54 return 0; |
55 } | 55 } |
56 | 56 |
57 void audioDB::sample(const char *dbName) { | 57 void audioDB::sample(const char *dbName) { |
58 initTables(dbName, 0); | 58 initTables(dbName, 0); |
59 | 59 if(dbH->flags & O2_FLAG_LARGE_ADB){ |
60 error("error: sample not yet supported for LARGE_ADB"); | |
61 } | |
62 | |
60 // build track offset table (FIXME: cut'n'pasted from query.cpp) | 63 // build track offset table (FIXME: cut'n'pasted from query.cpp) |
61 off_t *trackOffsetTable = new off_t[dbH->numFiles]; | 64 off_t *trackOffsetTable = new off_t[dbH->numFiles]; |
62 unsigned cumTrack=0; | 65 unsigned cumTrack=0; |
63 for(unsigned int k = 0; k < dbH->numFiles; k++){ | 66 for(unsigned int k = 0; k < dbH->numFiles; k++){ |
64 trackOffsetTable[k] = cumTrack; | 67 trackOffsetTable[k] = cumTrack; |