Mercurial > hg > qm-dsp
comparison dsp/segmentation/ClusterMeltSegmenter.cpp @ 269:a63c7b6191b5
* Add direct support for ATLAS version of CLAPACK
author | Chris Cannam <c.cannam@qmul.ac.uk> |
---|---|
date | Wed, 13 Feb 2008 12:49:47 +0000 |
parents | 9edaa3ce62e8 |
children | d72fcd34d9a7 |
comparison
equal
deleted
inserted
replaced
268:9aedf5ea8c35 | 269:a63c7b6191b5 |
---|---|
110 } | 110 } |
111 | 111 |
112 int | 112 int |
113 ClusterMeltSegmenter::getWindowsize() | 113 ClusterMeltSegmenter::getWindowsize() |
114 { | 114 { |
115 return static_cast<int>(windowSize * samplerate); | 115 return static_cast<int>(windowSize * samplerate + 0.001); |
116 } | 116 } |
117 | 117 |
118 int | 118 int |
119 ClusterMeltSegmenter::getHopsize() | 119 ClusterMeltSegmenter::getHopsize() |
120 { | 120 { |
121 return static_cast<int>(hopSize * samplerate); | 121 return static_cast<int>(hopSize * samplerate + 0.001); |
122 } | 122 } |
123 | 123 |
124 void ClusterMeltSegmenter::extractFeatures(const double* samples, int nsamples) | 124 void ClusterMeltSegmenter::extractFeatures(const double* samples, int nsamples) |
125 { | 125 { |
126 if (featureType == FEATURE_TYPE_CONSTQ || | 126 if (featureType == FEATURE_TYPE_CONSTQ || |