comparison audioDB.cpp @ 672:a35ca2d5f238

Extend results structure to include a key for the query. Fill that key from the query datum, if given, defaulting to ""; patch up bindings and tests. This is so that (Instance x Instance) operations such as querying and sampling can be supported.
author mas01cr
date Fri, 05 Mar 2010 16:00:53 +0000
parents 536cfa209e7f
children c62041316a44
comparison
equal deleted inserted replaced
671:537bfd7e15a1 672:a35ca2d5f238
963 error("audiodb_query_spec failed"); 963 error("audiodb_query_spec failed");
964 } 964 }
965 965
966 for(unsigned int k = 0; k < rs->nresults; k++) { 966 for(unsigned int k = 0; k < rs->nresults; k++) {
967 adb_result_t r = rs->results[k]; 967 adb_result_t r = rs->results[k];
968 reporter->add_point(audiodb_key_index(adb, r.key), r.qpos, r.ipos, r.dist); 968 reporter->add_point(audiodb_key_index(adb, r.ikey), r.qpos, r.ipos, r.dist);
969 } 969 }
970 audiodb_query_free_results(adb, &qspec, rs); 970 audiodb_query_free_results(adb, &qspec, rs);
971 971
972 reporter->report(adb, soap, adbQueryResponse); 972 reporter->report(adb, soap, adbQueryResponse);
973 } 973 }