Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages  

QwavPeakVector Class Reference

#include <qwavpeakvector.h>

Inheritance diagram for QwavPeakVector:

Inheritance graph
Collaboration diagram for QwavPeakVector:

Collaboration graph
List of all members.

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)
QwavPeakUpdaterpeakUpdateStrategy () 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

Detailed Description

The QwavPeakVector stores layers of peak information generated from a waveforms data.

The generated peak informations are used to display the waveform graphically.

See also:

Constructor & Destructor Documentation

Qwav_BEGIN_NAMESPACE QwavPeakVector::QwavPeakVector void   

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.

QwavPeakVector::QwavPeakVector QwavWaveDataInterface   wave


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.



Deletes the currently set PeakUpdateStrategy object.

Member Function Documentation

uint QwavPeakVector::getNrOfSamples void    const [inline]

Returns the number of samples in the wavefrom used by this peak vector.

the number of samples

Reimplemented in PeakVectorSimulator.

QwavPeakInfo QwavPeakVector::getPeak QwavPeakInterpolator   s,
int    pixel,
int    firstSample,
Float    zoomFac = 1.0,
uint    channel = 1
const [inline]

The idea behind the whole display code for the wave is the usage of a

See also:
If we display a waveform horizontally, we usually do not display it 1:1 in terms of samples/pixels. A short waveform already exceeds the available horizontal pixels on the display, thus we look onto the waveform in a zoomed out view. To allow fast zooming and panning on the waveform, we need to precalculate some stuff.

To display a waveform we need it's peaks. A

See also:
QwavPeakVector contains layers of
    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

void QwavPeakVector::setPeakUpdateStrategy QwavPeakUpdater   s [inline]

Sets a new strategy used when updating the peak information of a waveform.

s  the new strategy

bool QwavPeakVector::setWave QwavWaveDataInterface   wave

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().

void QwavPeakVector::updatePeaks void   

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.

The documentation for this class was generated from the following files:
Generated on Mon Jan 20 00:24:56 2003 for Qwav by doxygen1.2.16