Mercurial > hg > audiodb
diff audioDB.cpp @ 142:c74048e9b569 powertable
Beginnings of power table support
Database header change (and hence version)
Read in the powertable on init (and write on create)
author | mas01cr |
---|---|
date | Tue, 30 Oct 2007 14:26:50 +0000 |
parents | ddd83d773d6c |
children | 6ae986868114 |
line wrap: on
line diff
--- a/audioDB.cpp Tue Oct 30 11:44:49 2007 +0000 +++ b/audioDB.cpp Tue Oct 30 14:26:50 2007 +0000 @@ -412,6 +412,7 @@ dbH->dataOffset = ALIGN_UP(dbH->trackTableOffset + O2_TRACKTABLESIZE*maxfiles, 8); dbH->l2normTableOffset = ALIGN_DOWN(size - maxfiles*O2_MEANNUMVECTORS*sizeof(double), 8); dbH->timesTableOffset = ALIGN_DOWN(dbH->l2normTableOffset - maxfiles*O2_MEANNUMVECTORS*sizeof(double), 8); + dbH->powerTableOffset = ALIGN_DOWN(dbH->timesTableOffset - maxfiles*O2_MEANNUMVECTORS*sizeof(double), 8); dbH->dbSize = size; memcpy (db, dbH, O2_HEADERSIZE); @@ -470,6 +471,7 @@ dataBuf = (double *) (db + dbH->dataOffset); l2normTable = (double *) (db + dbH->l2normTableOffset); timesTable = (double *) (db + dbH->timesTableOffset); + powerTable = (double *) (db + dbH->powerTableOffset); } void audioDB::initTables(const char* dbName, bool forWrite, const char* inFile = 0) {