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

Magnitude spectrum content interface. More...

#include <DAFFContentMS.h>

Inheritance diagram for DAFFContentMS:
DAFFContent DAFFReaderImpl

Public Member Functions

virtual ~DAFFContentMS ()
 
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...
 
- 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

Magnitude spectrum content interface.

This purely abstract class defines the special interface for magnitude spectrum content (frequency-domain). Each record contains for each channel a fixed number of magnitude 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.

Definition at line 31 of file DAFFContentMS.h.

Constructor & Destructor Documentation

virtual DAFFContentMS::~DAFFContentMS ( )
inlinevirtual

Definition at line 34 of file DAFFContentMS.h.

Member Function Documentation

virtual const std::vector<float>& DAFFContentMS::getFrequencies ( ) const
pure virtual

Retrieves the frequencies [in Hertz] at which values are defined.

Implemented in DAFFReaderImpl.

virtual int DAFFContentMS::getMagnitude ( int  iRecordIndex,
int  iChannel,
int  iFreqIndex,
float &  fMag 
) const
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.

Parameters
[in]iRecordIndexRecord index (direction)
[in]iChannelChannel index
[in]iFreqIndexFrequency index
[out]fMagMagnuitude value
Returns
DAFF_NO_ERROR on success, another DAFF_ERROR otherwise
Note
The magnitude value is a factor (no decibel).

Implemented in DAFFReaderImpl.

virtual int DAFFContentMS::getMagnitudes ( int  iRecordIndex,
int  iChannel,
float *  pfDest 
) const
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.

Parameters
[in]iRecordIndexRecord index (direction)
[in]iChannelChannel index
[out]pfDestDestination buffer (size >= number of frequencies)
Returns
DAFF_NO_ERROR on success, another DAFF_ERROR otherwise
Note
The magnitude values are factors (no decibel).

Implemented in DAFFReaderImpl.

virtual int DAFFContentMS::getNumFrequencies ( ) const
pure virtual

Returns the number of support points (frequencies)

Implemented in DAFFReaderImpl.

virtual float DAFFContentMS::getOverallMagnitudeMaximum ( ) const
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.


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.