#include <qwavpeakvector.h>
Inheritance diagram for QwavPeakVector:
Public Methods | |
QwavPeakVector (void) | |
QwavPeakVector (QwavWaveDataInterface *wave) | |
~QwavPeakVector () | |
bool | setWave (QwavWaveDataInterface *wave) |
const QwavBlockSizeMap & | getBlockSizeMap (uint channel=1) const |
QwavBlockSizeMap & | getBlockSizeMap (uint channel=1) |
QwavPeakInfo | getPeak (QwavPeakInterpolator *s, int pixel, int nPixels, Float zoomFac=1.0, uint channel=1) const |
void | setPeakUpdateStrategy (QwavPeakUpdater *s) |
QwavPeakUpdater * | peakUpdateStrategy () const |
void | updatePeaks (void) |
uint | getNrOfSamples (void) const |
uint | getNrOfChannels (void) const |
const Float & | operator[] (uint index) const |
bool | writePeakFile (const string &filename) |
Static Public Attributes | |
const int | maxBlockSize = 262144 |
The generated peak informations are used to display the waveform graphically.
|
Standard constructor. Constructs a QwavPeakVector object and installs a QwavQwavDefaultUpdatePeakStrategy. The created object will not be valid and no peak data will be present until setWave() is called. |
|
Constructor. Constructs a QwavPeakVector object. If no other strategy is defined the QwavQwavDefaultPeakUpdater is used and the peak-info layers of the QwavQwavDefaultPeakUpdater is used and the peak-info layers of the specified wave are generated. |
|
Destructor. Deletes the currently set PeakUpdateStrategy object. |
|
Returns the number of samples in the wavefrom used by this peak vector.
Reimplemented in PeakVectorSimulator. |
|
The idea behind the whole display code for the wave is the usage of a
To display a waveform we need it's peaks. A
size: 154990 channels: 1 rate: 44100 n=2, number of peak-blocks: 77495 n=4, number of peak-blocks: 38748 n=8, number of peak-blocks: 19374 n=16, number of peak-blocks: 9687 n=32, number of peak-blocks: 4844 n=64, number of peak-blocks: 2422 n=128, number of peak-blocks: 1211 n=256, number of peak-blocks: 606 n=512, number of peak-blocks: 303 n=1024, number of peak-blocks: 152 n=2048, number of peak-blocks: 76 n=4096, number of peak-blocks: 38 |
|
Sets a new strategy used when updating the peak information of a waveform.
|
|
Sets a new wave. Assumes the wave to be open. Setting a new wave requires recalculation of the whole vector, which is done by calling updatePeaks(). |
|
The updatePeaks() method does not do much work itself. It first stores the current time, calls the updatePeaks() method of the current PeakUpdateStrategy to do the main job and finally prints out the elapsed time. |