Mercurial > hg > audiodb
diff insert.cpp @ 320:a995e5ad999a large_adb
working LARGE_ADB support. Activiate at creation time with -N --ntracks 20001 or greater, or with --datasize 1356 or greater, or both. LARGE_ADB blocks non-indexed QUERY.
author | mas01mc |
---|---|
date | Wed, 20 Aug 2008 13:50:58 +0000 |
parents | c270d9e4659a |
children | da2272e029b3 |
line wrap: on
line diff
--- a/insert.cpp Tue Aug 19 20:27:15 2008 +0000 +++ b/insert.cpp Wed Aug 20 13:50:58 2008 +0000 @@ -157,14 +157,14 @@ } void audioDB::insertPowerData(unsigned numVectors, int powerfd, double *powerdata) { - if (usingPower) { + if(usingPower){ if (!(dbH->flags & O2_FLAG_POWER)) { error("Cannot insert power data on non-power DB", dbName); } - + int one; unsigned int count; - + count = read(powerfd, &one, sizeof(unsigned int)); if (count != sizeof(unsigned int)) { error("powerfd read failed", "int", "read"); @@ -172,7 +172,7 @@ if (one != 1) { error("dimensionality of power file not 1", powerFileName); } - + // FIXME: should check that the powerfile is the right size for // this. -- CSR, 2007-10-30 count = read(powerfd, powerdata, numVectors * sizeof(double));