![]() |
OpenDAFF C++ API
v1.7
Directional Audio File Format
|
Impulse response content interface. More...
#include <DAFFContentIR.h>
Public Member Functions | |
virtual | ~DAFFContentIR () |
virtual double | getSamplerate () const =0 |
Returns the sampling rate [in Hertz]. More... | |
virtual int | getFilterLength () const =0 |
Returns the number of filter coefficients. More... | |
virtual int | getFilterCoeffs (int iRecordIndex, int iChannel, float *pfDest, float fGain=1.0F) const =0 |
Retrieves filter coefficients for record and channel. More... | |
virtual int | addFilterCoeffs (int iRecordIndex, int iChannel, float *pfDest, float fGain=1.0F) const =0 |
Adds filter coefficients for record and channel to a given buffer. More... | |
virtual int | getMinEffectiveFilterOffset () const =0 |
Returns the minimal effective filter offset over all records. More... | |
virtual int | getMaxEffectiveFilterLength () const =0 |
Returns the maximum effective filter length over all records. More... | |
virtual int | getEffectiveFilterBounds (int iRecordIndex, int iChannel, int &iOffset, int &iLength) const =0 |
Retrieves the offset and length of the effective part of a filter. More... | |
virtual int | getEffectiveFilterCoeffs (int iRecordIndex, int iChannel, float *pfDest, float fGain=1.0F) const =0 |
Retrieves effective filter coefficients for record and channel. More... | |
virtual int | addEffectiveFilterCoeffs (int iRecordIndex, int iChannel, float *pfDest, float fGain=1.0F) const =0 |
Adds effective filter coefficients for record and channel to a given buffer. More... | |
virtual float | getOverallPeak ()=0 |
Get overall peak value. 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... | |
Impulse response content interface.
This purely abstract class defines the special interface for impulse response content (time-domain). Each record contains impulse responses (IRs) of a fixed length (number of filter coefficients) defined for each channel.
The simple way to access the IR coefficients is to use the method getFilterCoeffs, which delivers the full impulse response for a given direction (record index) and channel.
A more advanced method is to only copy and process those filter coefficients which are effective, meaning that they are non-zero. To determine this effectiv range (start and length) you can employ the method getEffectiveFilterBounds. You can request the effective filter coefficients only using the method getEffectiveFilterCoeffs and thus improve execution speed. For more details please refer to the manual.
Definition at line 38 of file DAFFContentIR.h.
|
inlinevirtual |
Definition at line 41 of file DAFFContentIR.h.
|
pure virtual |
Adds effective filter coefficients for record and channel to a given buffer.
This method retrieves effective filter impulse response only (non-zero sample range) for the given direction (record index) and channel and numerically adds them in the supplied destination buffer. The method writes exactly as many filter coefficients into the buffer as the effective filter is long. This length can be requested using the getEffectiveFilterBounds() method. A copy of the entire filter in user code can be avoided using the add filter funcionality. Extensive use of record requests can be accelerated by this method. The method starts to write into the destination buffer at position 0 (but not the effective filter offset).
iRecordIndex | Record index (direction) |
iChannel | Channel index |
pfDest | Destination buffer (size >= effective filter length) |
fGain | Gain factor (optional, default: 1) |
Implemented in DAFFReaderImpl.
|
pure virtual |
Adds filter coefficients for record and channel to a given buffer.
This method retrieves the full filter impulse response for the given direction (record index) and channel and numerically adds them in the supplied destination buffer. The method writes exactly as many filter coefficients into the buffer as the filter is long. A copy of the entire filter in user code can be avoided using the add filter funcionality. Extensive use of record requests can be accelerated by this method.
[in] | iRecordIndex | Record index (direction) |
[in] | iChannel | Channel index |
[out] | pfDest | Destination buffer (size >= filter length) |
[in] | fGain | Gain factor (optional, default: 1) |
Implemented in DAFFReaderImpl.
|
pure virtual |
Retrieves the offset and length of the effective part of a filter.
This method retrieves the start (offset) and length of the effective filter zone for the given direction (record index) and channel.
[in] | iRecordIndex | Record index (direction) [in] |
[in] | iChannel | Channel index [in] |
[out] | iOffset | Effective filter offset [out] |
[out] | iLength | Effective filter length [out] |
Implemented in DAFFReaderImpl.
|
pure virtual |
Retrieves effective filter coefficients for record and channel.
This method retrieves the only the effective (non-zero) filter impulse coefficients for the given direction (record index) and channel and stores them in the supplied destination buffer. The method only writes as many filter coefficients into the buffer as this very filter's effective length. This length can be determined using the method getEffectiveFilterBounds. The method starts to write into the destination buffer at position 0 (but not the effective filter offset).
[in] | iRecordIndex | Record index (direction) |
[in] | iChannel | Channel index |
[out] | pfDest | Destination buffer (size >= effective filter length) |
[in] | fGain | Gain factor (optional, default: 1) |
Implemented in DAFFReaderImpl.
|
pure virtual |
Retrieves filter coefficients for record and channel.
This method retrieves the full filter impulse response for the given direction (record index) and channel and stores them in the supplied destination buffer. The method writes exactly as many filter coefficients into the buffer as the filter length.
[in] | iRecordIndex | Record index (direction) |
[in] | iChannel | Channel index |
[out] | pfDest | Destination buffer (size >= filter length) |
[in] | fGain | Gain factor (optional, default: 1) |
Implemented in DAFFReaderImpl.
|
pure virtual |
Returns the number of filter coefficients.
This function returns the number of data elements each data record consists of. For impuls response this means the number of filter coefficients, ergo the filter length.
Implemented in DAFFReaderImpl.
|
pure virtual |
Returns the maximum effective filter length over all records.
This methods returns the maximum effective filter length over all records, ergo the greatest length you could be faced with among all records.
This value is helpful for buffer dimensioning, when using the low-level interface.
Implemented in DAFFReaderImpl.
|
pure virtual |
Returns the minimal effective filter offset over all records.
This methods returns the minimal effective filter offset over all records, ergo the smallest offset you could be faced with among all records.
This value is helpful if you for instance want to ignore the sound runtime (leading zeros) and compensate it.
Implemented in DAFFReaderImpl.
|
pure virtual |
|
pure virtual |
Returns the sampling rate [in Hertz].
Implemented in DAFFReaderImpl.