Mercurial > hg > audiodb
comparison 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 |
comparison
equal
deleted
inserted
replaced
275:d209e8470a60 | 280:3be15407e814 |
---|---|
35 else if(O2_ACTION(COM_STATUS)) | 35 else if(O2_ACTION(COM_STATUS)) |
36 if(isClient) | 36 if(isClient) |
37 ws_status(dbName,(char*)hostport); | 37 ws_status(dbName,(char*)hostport); |
38 else | 38 else |
39 status(dbName); | 39 status(dbName); |
40 | |
41 else if(O2_ACTION(COM_SAMPLE)) | |
42 sample(dbName); | |
40 | 43 |
41 else if(O2_ACTION(COM_L2NORM)) | 44 else if(O2_ACTION(COM_L2NORM)) |
42 l2norm(dbName); | 45 l2norm(dbName); |
43 | 46 |
44 else if(O2_ACTION(COM_POWER)) | 47 else if(O2_ACTION(COM_POWER)) |
208 command=COM_STATUS; | 211 command=COM_STATUS; |
209 dbName=args_info.database_arg; | 212 dbName=args_info.database_arg; |
210 return 0; | 213 return 0; |
211 } | 214 } |
212 | 215 |
216 if(args_info.SAMPLE_given) { | |
217 command = COM_SAMPLE; | |
218 dbName = args_info.database_arg; | |
219 sequenceLength = args_info.sequencelength_arg; | |
220 if(sequenceLength < 1 || sequenceLength > 1000) { | |
221 error("seqlen out of range: 1 <= seqlen <= 1000"); | |
222 } | |
223 nsamples = args_info.nsamples_arg; | |
224 return 0; | |
225 } | |
226 | |
213 if(args_info.DUMP_given){ | 227 if(args_info.DUMP_given){ |
214 command=COM_DUMP; | 228 command=COM_DUMP; |
215 dbName=args_info.database_arg; | 229 dbName=args_info.database_arg; |
216 output = args_info.output_arg; | 230 output = args_info.output_arg; |
217 return 0; | 231 return 0; |