Mercurial > hg > audiodb
diff audioDB.cpp @ 280:3be15407e814
Merge sampling branch (-r361:405, though I hope that the branch is now
finished) onto trunk. API developers take note.
Things still to clear up:
* whether the threshold distance it currently reports bears any relation
to reality;
* if not, how to bring it a bit more into alignment;
* minor code cleanup issues in sample.cpp;
* incorporating --absolute-threshold handling into sampling;
* writing suitable test cases.
author | mas01cr |
---|---|
date | Wed, 02 Jul 2008 14:07:10 +0000 |
parents | 210b2f661b88 |
children | cacad987d785 |
line wrap: on
line diff
--- a/audioDB.cpp Mon Jun 30 17:38:59 2008 +0000 +++ b/audioDB.cpp Wed Jul 02 14:07:10 2008 +0000 @@ -37,6 +37,9 @@ ws_status(dbName,(char*)hostport); else status(dbName); + + else if(O2_ACTION(COM_SAMPLE)) + sample(dbName); else if(O2_ACTION(COM_L2NORM)) l2norm(dbName); @@ -210,6 +213,17 @@ return 0; } + if(args_info.SAMPLE_given) { + command = COM_SAMPLE; + dbName = args_info.database_arg; + sequenceLength = args_info.sequencelength_arg; + if(sequenceLength < 1 || sequenceLength > 1000) { + error("seqlen out of range: 1 <= seqlen <= 1000"); + } + nsamples = args_info.nsamples_arg; + return 0; + } + if(args_info.DUMP_given){ command=COM_DUMP; dbName=args_info.database_arg;