comparison examples/PowerSpectrum.cpp @ 255:88ef5ffdbe8d

* docs
author cannam
date Wed, 12 Nov 2008 14:11:01 +0000
parents 70e6826adc64
children 7d59dd1ba5de
comparison
equal deleted inserted replaced
254:e02c93c4de8f 255:88ef5ffdbe8d
113 d.identifier = "powerspectrum"; 113 d.identifier = "powerspectrum";
114 d.name = "Power Spectrum"; 114 d.name = "Power Spectrum";
115 d.description = "Power values of the frequency spectrum bins calculated from the input signal"; 115 d.description = "Power values of the frequency spectrum bins calculated from the input signal";
116 d.unit = ""; 116 d.unit = "";
117 d.hasFixedBinCount = true; 117 d.hasFixedBinCount = true;
118 d.binCount = m_blockSize / 2 + 1; 118 if (m_blockSize == 0) {
119 // Just so as not to return "1". This is the bin count that
120 // would result from a block size of 1024, which is a likely
121 // default -- but the host should always set the block size
122 // before querying the bin count for certain.
123 d.binCount = 513;
124 } else {
125 d.binCount = m_blockSize / 2 + 1;
126 }
119 d.hasKnownExtents = false; 127 d.hasKnownExtents = false;
120 d.isQuantized = false; 128 d.isQuantized = false;
121 d.sampleType = OutputDescriptor::OneSamplePerStep; 129 d.sampleType = OutputDescriptor::OneSamplePerStep;
122 list.push_back(d); 130 list.push_back(d);
123 131