Mercurial > hg > audiodb
comparison index.cpp @ 433:681837f7c903 api-inversion
More on the query rationalization
Turn audioDB::delete_arrays and audioDB::read_data into ordinary
functions.
Also partially do audioDB::initialize_arrays, except for the bits that
we can't yet do because we haven't got a query datum/identifier going
through yet.
author | mas01cr |
---|---|
date | Wed, 24 Dec 2008 10:55:48 +0000 |
parents | 8632cd387e24 |
children | 53c487885b2c |
comparison
equal
deleted
inserted
replaced
432:62a0515f59be | 433:681837f7c903 |
---|---|
336 if(prefixedString!=tmpStr) | 336 if(prefixedString!=tmpStr) |
337 delete[] tmpStr; | 337 delete[] tmpStr; |
338 initInputFile(prefixedString, false); // nommap, file pointer at correct position | 338 initInputFile(prefixedString, false); // nommap, file pointer at correct position |
339 trackfd = infid; | 339 trackfd = infid; |
340 } | 340 } |
341 read_data(trackfd, trackID, &fvp, &nfv); // over-writes fvp and nfv | 341 if(audiodb_read_data(adb, trackfd, trackID, &fvp, &nfv)) |
342 error("failed to read data"); | |
342 *fvpp = fvp; // Protect memory allocation and free() for track data | 343 *fvpp = fvp; // Protect memory allocation and free() for track data |
343 | 344 |
344 if( dbH->flags & O2_FLAG_LARGE_ADB ) | 345 if( dbH->flags & O2_FLAG_LARGE_ADB ) |
345 // Load power and calculate power and l2norm sequence sums | 346 // Load power and calculate power and l2norm sequence sums |
346 init_track_aux_data(trackID, fvp, sNormpp, snPtrp, sPowerp, spPtrp); | 347 init_track_aux_data(trackID, fvp, sNormpp, snPtrp, sPowerp, spPtrp); |