![]() |
OpenDAFF C++ API
v1.7
Directional Audio File Format
|
Discrete Fourier spectrum content interface. More...
#include <DAFFContentDFT.h>
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... | |
![]() | |
virtual | ~DAFFContent () |
virtual DAFFReader * | getParent () const =0 |
Returns the parent reader. More... | |
virtual const DAFFProperties * | getProperties () const =0 |
Returns the properties. More... | |
virtual const DAFFMetadata * | getRecordMetadata (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... | |
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.
|
inlinevirtual |
Definition at line 34 of file DAFFContentDFT.h.
|
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.
[in] | iRecordIndex | Record index (direction) |
[in] | iChannel | Channel index |
[in] | iDFTCoeff | DFT coefficient index |
[out] | fReal | Real part |
[out] | fImag | Imaginary part |
Implemented in DAFFReaderImpl, and DAFFContentDFTRealization.
|
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], ...)
iRecordIndex | Record index (direction) |
iChannel | Channel index |
pfDest | Destination buffer (size >= 2*getNumDFTCoeffs()) |
Implemented in DAFFReaderImpl, and DAFFContentDFTRealization.
|
pure virtual |
Returns the frequency resolution [in Hertz].
Implemented in DAFFReaderImpl, and DAFFContentDFTRealization.
|
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.
Implemented in DAFFReaderImpl, and DAFFContentDFTRealization.
|
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.
Implemented in DAFFReaderImpl, and DAFFContentDFTRealization.
|
pure virtual |
Returns the correspondig sampling rate [in Hertz].
Implemented in DAFFReaderImpl, and DAFFContentDFTRealization.
|
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.
Implemented in DAFFReaderImpl, and DAFFContentDFTRealization.
|
pure virtual |
Returns whether the spectrum is complex-conjugated symmetric.
Implemented in DAFFReaderImpl, and DAFFContentDFTRealization.