RTP Audio System  2.0.0
SpectrumAnalyzer Class Reference

Spectrum Analyzer. More...

#include <spectrumanalyzer.h>

Inheritance diagram for SpectrumAnalyzer:
AudioWriterInterface Synchronizable AdjustableAudioQualityInterface AudioQualityInterface

List of all members.

Public Member Functions

 SpectrumAnalyzer ()
 ~SpectrumAnalyzer ()
card16 getSamplingRate () const
card8 getBits () const
card8 getChannels () const
card16 getByteOrder () const
cardinal getBytesPerSecond () const
cardinal getBitsPerSample () const
card16 setSamplingRate (const card16 samplingRate)
card8 setBits (const card8 bits)
card8 setChannels (const card8 channels)
card16 setByteOrder (const card16 byteOrder)
bool ready () const
void sync ()
bool write (const void *data, const size_t length)
bool getSpectrum (cardinal *left, cardinal *right, const cardinal bars)

Private Member Functions

void doFourierTransformation (card16 *data, cardinal *output, cardinal bars)

Private Attributes

FastFourierTransformationFFT
cardinal InputBufferPos
char InputBuffer [4 *FFTPoints]
card16 AudioSamplingRate
card8 AudioBits
card8 AudioChannels
card16 AudioByteOrder

Static Private Attributes

static const cardinal FFTPoints = 256

Detailed Description

Spectrum Analyzer.

This class implements a spectrum analyzer device implementing AudioWriterInterface.

Author:
Thomas Dreibholz
Version:
1.0

Constructor & Destructor Documentation


Member Function Documentation

void SpectrumAnalyzer::doFourierTransformation ( card16 data,
cardinal output,
cardinal  bars 
) [private]
bool SpectrumAnalyzer::getSpectrum ( cardinal left,
cardinal right,
const cardinal  bars 
)

Do Fourier transformation and get spectrum.

Parameters:
leftPointer to spectrum array for left channel.
rightPointer to spectrum array for right channel.
barsNumber of bars.
Returns:
true, if spectrum has been computed; false, if there is not enough input data available.
bool SpectrumAnalyzer::ready ( ) const [virtual]
void SpectrumAnalyzer::sync ( ) [virtual]
bool SpectrumAnalyzer::write ( const void *  data,
const size_t  length 
) [virtual]

Member Data Documentation

const cardinal SpectrumAnalyzer::FFTPoints = 256 [static, private]

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines