RTP Audio System
2.0.0
|
Spectrum Analyzer. More...
#include <spectrumanalyzer.h>
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 | |
FastFourierTransformation * | FFT |
cardinal | InputBufferPos |
char | InputBuffer [4 *FFTPoints] |
card16 | AudioSamplingRate |
card8 | AudioBits |
card8 | AudioChannels |
card16 | AudioByteOrder |
Static Private Attributes | |
static const cardinal | FFTPoints = 256 |
Spectrum Analyzer.
This class implements a spectrum analyzer device implementing AudioWriterInterface.
Constructor.
Destructor.
void SpectrumAnalyzer::doFourierTransformation | ( | card16 * | data, |
cardinal * | output, | ||
cardinal | bars | ||
) | [private] |
card8 SpectrumAnalyzer::getBits | ( | ) | const [virtual] |
getBits() Implementation of AudioQualityInterface.
Implements AudioQualityInterface.
cardinal SpectrumAnalyzer::getBitsPerSample | ( | ) | const [virtual] |
getBitsPerSample() Implementation of AudioQualityInterface.
Implements AudioQualityInterface.
card16 SpectrumAnalyzer::getByteOrder | ( | ) | const [virtual] |
getByteOrder() Implementation of AudioQualityInterface.
Implements AudioQualityInterface.
cardinal SpectrumAnalyzer::getBytesPerSecond | ( | ) | const [virtual] |
getBytesPerSecond() Implementation of AudioQualityInterface.
Implements AudioQualityInterface.
card8 SpectrumAnalyzer::getChannels | ( | ) | const [virtual] |
getChannels() Implementation of AudioQualityInterface.
Implements AudioQualityInterface.
card16 SpectrumAnalyzer::getSamplingRate | ( | ) | const [virtual] |
getSamplingRate() Implementation of AudioQualityInterface.
Implements AudioQualityInterface.
bool SpectrumAnalyzer::getSpectrum | ( | cardinal * | left, |
cardinal * | right, | ||
const cardinal | bars | ||
) |
Do Fourier transformation and get spectrum.
left | Pointer to spectrum array for left channel. |
right | Pointer to spectrum array for right channel. |
bars | Number of bars. |
bool SpectrumAnalyzer::ready | ( | ) | const [virtual] |
ready() implementation of AudioWriterInterface
Implements AudioWriterInterface.
card8 SpectrumAnalyzer::setBits | ( | const card8 | bits | ) | [virtual] |
setBits() Implementation of AdjustableAudioQualityInterface.
Implements AdjustableAudioQualityInterface.
card16 SpectrumAnalyzer::setByteOrder | ( | const card16 | byteOrder | ) | [virtual] |
setByteOrder() Implementation of AdjustableAudioQualityInterface.
Implements AdjustableAudioQualityInterface.
card8 SpectrumAnalyzer::setChannels | ( | const card8 | channels | ) | [virtual] |
setChannels() Implementation of AdjustableAudioQualityInterface.
Implements AdjustableAudioQualityInterface.
card16 SpectrumAnalyzer::setSamplingRate | ( | const card16 | samplingRate | ) | [virtual] |
setSamplingRate() Implementation of AdjustableAudioQualityInterface.
Implements AdjustableAudioQualityInterface.
void SpectrumAnalyzer::sync | ( | ) | [virtual] |
sync() implementation of AudioWriterInterface
Implements AudioWriterInterface.
bool SpectrumAnalyzer::write | ( | const void * | data, |
const size_t | length | ||
) | [virtual] |
write() implementation of AudioWriterInterface
Implements AudioWriterInterface.
card8 SpectrumAnalyzer::AudioBits [private] |
card16 SpectrumAnalyzer::AudioByteOrder [private] |
card8 SpectrumAnalyzer::AudioChannels [private] |
card16 SpectrumAnalyzer::AudioSamplingRate [private] |
FastFourierTransformation* SpectrumAnalyzer::FFT [private] |
const cardinal SpectrumAnalyzer::FFTPoints = 256 [static, private] |
char SpectrumAnalyzer::InputBuffer[4 *FFTPoints] [private] |
cardinal SpectrumAnalyzer::InputBufferPos [private] |