OpenDAFF C++ API  v1.7
Directional Audio File Format
Public Member Functions | List of all members
DAFFContentDFT Class Referenceabstract

Discrete Fourier spectrum content interface. More...

#include <DAFFContentDFT.h>

Inheritance diagram for DAFFContentDFT:
DAFFContent DAFFContentDFTRealization DAFFReaderImpl

Public Member Functions

virtual ~DAFFContentDFT ()
 
virtual int getTransformSize () const =0
 Returns the size of the transform (number of overall DFT coefficients) More...
 
virtual int getNumDFTCoeffs () const =0
 Returns the number of DFT coefficients. More...
 
virtual bool isSymmetric () const =0
 Returns whether the spectrum is complex-conjugated symmetric. More...
 
virtual double getSamplerate () const =0
 Returns the correspondig sampling rate [in Hertz]. More...
 
virtual double getFrequencyBandwidth () const =0
 Returns the frequency resolution [in Hertz]. More...
 
virtual float getOverallMagnitudeMaximum () const =0
 Returns the overall greatest magnitude value. More...
 
virtual int getDFTCoeff (int iRecordIndex, int iChannel, int iDFTCoeff, float &fReal, float &fImag) const =0
 Retrieve a single magnitude coefficient. More...
 
virtual int getDFTCoeffs (int iRecordIndex, int iChannel, float *pfDest) const =0
 Retrieves magnitude coefficients. More...
 
- Public Member Functions inherited from DAFFContent
virtual ~DAFFContent ()
 
virtual DAFFReadergetParent () const =0
 Returns the parent reader. More...
 
virtual const DAFFPropertiesgetProperties () const =0
 Returns the properties. More...
 
virtual const DAFFMetadatagetRecordMetadata (int iRecordIndex) const =0
 Returns the metadata of a record. More...
 
virtual int getRecordCoords (int iRecordIndex, int iView, float &fAngle1Deg, float &fAngle2Deg) const =0
 Determines the spherical coordinates of a record (grid point on spherical regular grid) More...
 
virtual void getNearestNeighbour (int iView, float fAngle1Deg, float fAngle2Deg, int &iRecordIndex) const =0
 Determine the nearest neighbour record and return its index. More...
 
virtual void getNearestNeighbour (int iView, float fAngle1Deg, float fAngle2Deg, int &iRecordIndex, bool &bOutOfBounds) const =0
 Determine the nearest neighbour record and return its index (with boundary validatsion) More...
 
virtual void getCell (int iView, float fAngle1Deg, float fAngle2Deg, DAFFQuad &qIndices) const =0
 Determines the cell of a given direction on the sphere grid and delivers its surrounding record indices. More...
 
virtual void transformAnglesD2O (float fAlphaDeg, float fBetaDeg, float &fAzimuthDeg, float &fElevationDeg) const =0
 Transforms data spherical coordinates into object spherical coordinates. More...
 
virtual void transformAnglesO2D (float fAzimuthDeg, float fElevationDeg, float &fAlphaDeg, float &fBetaDeg) const =0
 Transforms object spherical coordinates into data spherical coordinates. More...
 

Detailed Description

Discrete Fourier spectrum content interface.

This purely abstract class defines the special interface for discrete Fourier spectrum content (frequency-domain). Each record contains for each channel a fixed number of complex-valued DFT coefficients, stored as real and imaginary part.

The number and values of the support frequencies can be determined using the methods getNumDFTCoeffs(), getFrequencyBandwidth() and getSamplingrate(). The magnitude coefficients can be retrieved using the method getDFTCoeffs().

Definition at line 31 of file DAFFContentDFT.h.

Constructor & Destructor Documentation

virtual DAFFContentDFT::~DAFFContentDFT ( )
inlinevirtual

Definition at line 34 of file DAFFContentDFT.h.

Member Function Documentation

virtual int DAFFContentDFT::getDFTCoeff ( int  iRecordIndex,
int  iChannel,
int  iDFTCoeff,
float &  fReal,
float &  fImag 
) const
pure virtual

Retrieve a single magnitude coefficient.

This method retrives a single complex-valued DFT coefficient for the given direction (record index) and channel and stores them in the supplied destination variable.

Parameters
[in]iRecordIndexRecord index (direction)
[in]iChannelChannel index
[in]iDFTCoeffDFT coefficient index
[out]fRealReal part
[out]fImagImaginary part
Returns
DAFF_NO_ERROR on success, another DAFF_ERROR otherwise

Implemented in DAFFReaderImpl, and DAFFContentDFTRealization.

virtual int DAFFContentDFT::getDFTCoeffs ( int  iRecordIndex,
int  iChannel,
float *  pfDest 
) const
pure virtual

Retrieves magnitude coefficients.

This method retrives the complex-valued DFT coefficients for the given direction (record index) and channel and stores them in the supplied destination buffer. The method writes exactly as many complex-valued coefficients as the function getNumDFTCoeffs() returns.

The output storage scheme is: pfDest = (Re[0], Im[0], Re[1], Im[1], ...)

Parameters
iRecordIndexRecord index (direction)
iChannelChannel index
pfDestDestination buffer (size >= 2*getNumDFTCoeffs())
Returns
DAFF_NO_ERROR on success, another DAFF_ERROR otherwise

Implemented in DAFFReaderImpl, and DAFFContentDFTRealization.

virtual double DAFFContentDFT::getFrequencyBandwidth ( ) const
pure virtual

Returns the frequency resolution [in Hertz].

Returns
Linear frequency spacing in Hertz

Implemented in DAFFReaderImpl, and DAFFContentDFTRealization.

virtual int DAFFContentDFT::getNumDFTCoeffs ( ) const
pure virtual

Returns the number of DFT coefficients.

This functions returns the actually stored number of complex-valued DFT coefficients. Note: For real-valued time-domain data, this includes only the non-symmetric coefficients. Examplarily, for a transform size of N the function returns floor(N/2)+1. For arbitrary complex-valued time-domain data the returned number equals the transform size.

Returns
Number of DFT coefficients

Implemented in DAFFReaderImpl, and DAFFContentDFTRealization.

virtual float DAFFContentDFT::getOverallMagnitudeMaximum ( ) const
pure virtual

Returns the overall greatest magnitude value.

This method returns the greatest magnitude value of the DFT coefficients over all directions, channels and frequencies.

Returns
Absolute maximum magnitude value

Implemented in DAFFReaderImpl, and DAFFContentDFTRealization.

virtual double DAFFContentDFT::getSamplerate ( ) const
pure virtual

Returns the correspondig sampling rate [in Hertz].

Returns
Sampling rate in Hertz

Implemented in DAFFReaderImpl, and DAFFContentDFTRealization.

virtual int DAFFContentDFT::getTransformSize ( ) const
pure virtual

Returns the size of the transform (number of overall DFT coefficients)

This functions returns the overall number of complex-valued DFT coefficients. Note: For real-valued time-domain data, this also includes the symmetric coefficients.

Returns
DFT transform size

Implemented in DAFFReaderImpl, and DAFFContentDFTRealization.

virtual bool DAFFContentDFT::isSymmetric ( ) const
pure virtual

Returns whether the spectrum is complex-conjugated symmetric.

Returns
True, if the DFT spectrum is complex-conjugated symmetric

Implemented in DAFFReaderImpl, and DAFFContentDFTRealization.


The documentation for this class was generated from the following file:
OpenDAFF is a project from the Institute of Technical Acoustics, RWTH Aachen University, Germany.