Mercurial > hg > audiodb
comparison audioDB.cpp @ 279:dee55886eca0 sampling
make the RNG a part of the audioDB object.
Easier to deal with memory discipline and initialization (though note
the FIXME comment in audioDB::initTables()).
Also initialize the RNG from the current time. A mature implementation
would use a proper source of entropy...
author | mas01cr |
---|---|
date | Wed, 02 Jul 2008 13:53:23 +0000 |
parents | 1c76d5f41708 |
children |
comparison
equal
deleted
inserted
replaced
278:d9dba57becd4 | 279:dee55886eca0 |
---|---|
95 if(timesTable) | 95 if(timesTable) |
96 munmap(timesTable, timesTableLength); | 96 munmap(timesTable, timesTableLength); |
97 if(l2normTable) | 97 if(l2normTable) |
98 munmap(l2normTable, l2normTableLength); | 98 munmap(l2normTable, l2normTableLength); |
99 | 99 |
100 if(rng) | |
101 gsl_rng_free(rng); | |
102 | |
100 if(dbfid>0) | 103 if(dbfid>0) |
101 close(dbfid); | 104 close(dbfid); |
102 if(infid>0) | 105 if(infid>0) |
103 close(infid); | 106 close(infid); |
104 if(dbH) | 107 if(dbH) |