![]() |
OpenDAFF C++ API
v1.7
Directional Audio File Format
|
Magnitude-phase spectrum content interface. More...
#include <DAFFContentMPS.h>
Public Member Functions | |
virtual | ~DAFFContentMPS () |
virtual int | getNumFrequencies () const =0 |
Returns the number of support points (frequencies) More... | |
virtual const std::vector< float > & | getFrequencies () const =0 |
Retrieves the frequencies [in Hertz] at which values are defined. More... | |
virtual float | getOverallMagnitudeMaximum () const =0 |
Returns the overall greatest magnitude value. More... | |
virtual int | getMagnitudes (int iRecordIndex, int iChannel, float *pfDest) const =0 |
Retrieves magnitude coefficients. More... | |
virtual int | getMagnitude (int iRecordIndex, int iChannel, int iFreqIndex, float &fMag) const =0 |
Retrieves a single magnitude coefficient. More... | |
virtual int | getPhases (int iRecordIndex, int iChannel, float *pfDest) const =0 |
Retrieves phase coefficients. More... | |
virtual int | getPhase (int iRecordIndex, int iChannel, int iFreqIndex, float &fPhase) const =0 |
Retrieves a single phase coefficient. More... | |
virtual int | getCoefficientsMP (int iRecordIndex, int iChannel, float *pfDest) const =0 |
Retrieves coefficients in polar form. More... | |
virtual int | getCoefficientsRI (int iRecordIndex, int iChannel, float *pfDest) const =0 |
Retrieves coefficients in cartesian form. 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... | |
Magnitude-phase spectrum content interface.
This purely abstract class defines the special interface for spectrum content (frequency-domain). Each record contains for each channel a fixed number of magnitude and phase coefficients defined over a common support of frequencies.
The number and values of the support frequencies can be determined using the methods getNumFrequencies and getFrequencies. The magnitude coefficients can be retrieved using the method getMagnitudes. The phase can be retrieved using getPhases. If you want both magnitude and phase use getCoefficientsMP. You will get the same as number with a real and imagninary part by getCoefficientsRI.
Definition at line 34 of file DAFFContentMPS.h.
|
inlinevirtual |
Definition at line 37 of file DAFFContentMPS.h.
|
pure virtual |
Retrieves coefficients in polar form.
This method retrives the coefficients for the given direction (record index) and channel and stores them in the supplied destination buffers. Each coefficient consists of a magnitude and phase which will be returned in the destination buffer. The method writes exactly as many coefficients as there are support frequencies. Their number can be determined using the method getNumFrequencies.
The output storage scheme is: pfDest = (Mag[0], Ph[0], Mag[1], Ph[1], ...)
[in] | iRecordIndex | Record index (direction) |
[in] | iChannel | Channel index |
[out] | pfDest | Destination buffer (size >= number of frequencies) |
Implemented in DAFFReaderImpl.
|
pure virtual |
Retrieves coefficients in cartesian form.
This method retrives the coefficients for the given direction (record index) and channel and stores them in the supplied destination buffers. Each coefficient consists of a real and imaginary part which will be returned in the destination buffer. The method writes exactly as many coefficients as there are support frequencies. Their number can be determined using the method getNumFrequencies.
The output storage scheme is: pfDest = (Re[0], Im[0], Re[1], Im[1], ...)
[in] | iRecordIndex | Record index (direction) |
[in] | iChannel | Channel index |
[out] | pfDest | Magnitudes destination buffer (size >= number of frequencies) |
Implemented in DAFFReaderImpl.
|
pure virtual |
Retrieves the frequencies [in Hertz] at which values are defined.
Implemented in DAFFReaderImpl.
|
pure virtual |
Retrieves a single magnitude coefficient.
This method retrives the magnitude coefficient for the given direction (record index), channel and frequency index. It stores the value in the supplied destination.
[in] | iRecordIndex | Record index (direction) |
[in] | iChannel | Channel index |
[in] | iFreqIndex | Frequency index |
[out] | fMag | Magnuitude value |
Implemented in DAFFReaderImpl.
|
pure virtual |
Retrieves magnitude coefficients.
This method retrives the magnitude coefficients for the given direction (record index) and channel and stores them in the supplied destination buffer. The method writes exactly as many coefficients as there are support frequencies. Their number can be determined using the method getNumFrequencies.
iRecordIndex | Record index (direction) |
iChannel | Channel index |
pfDest | Destination buffer (size >= number of frequencies) |
Implemented in DAFFReaderImpl.
|
pure virtual |
Returns the number of support points (frequencies)
Implemented in DAFFReaderImpl.
|
pure virtual |
Returns the overall greatest magnitude value.
This method returns the greatest magnitude value over all directions, channels and frequencies. It is important to know this value for instance for visualization.
Implemented in DAFFReaderImpl.
|
pure virtual |
Retrieves a single phase coefficient.
This method retrives the phase coefficient for the given direction (record index), channel and frequency index. It stores the value in the supplied destination.
[in] | iRecordIndex | Record index (direction) |
[in] | iChannel | Channel index |
[in] | iFreqIndex | Frequency index |
[out] | fPhase | Phase value |
Implemented in DAFFReaderImpl.
|
pure virtual |
Retrieves phase coefficients.
This method retrives the phase coefficients for the given direction (record index) and channel and stores them in the supplied destination buffer. The method writes exactly as many coefficients as there are support frequencies. Their number can be determined using the method getNumFrequencies.
[in] | iRecordIndex | Record index (direction) |
[in] | iChannel | Channel index |
[out] | pfDest | Destination buffer (size >= number of frequencies) |
Implemented in DAFFReaderImpl.