Creates 3D sound based on HRIR info from the LISTEN project.
More...
#include <miphrirlisten.h>
List of all members.
Public Member Functions |
| bool | init (const std::string &baseDirectory, int maxFilterLength=48, bool allowAmbientSound=true, bool useDistance=true) |
| | Initializes the component.
|
| bool | destroy () |
| | De-initializes the component.
|
| bool | selectHRIRSet (int subjectNumber, bool compensated=true) |
| | Select a specific HRIR data set.
|
| int | getSamplingRate () const |
| | Returns the sampling rate which is used by this component.
|
| bool | getSubjectNumbers (std::list< int > &subjectNumbers, bool compensated=true) |
| | Returns a list of the available subject numbers.
|
Detailed Description
Using this component, raw floating point mono audio messages can be converted into stereo raw floating point audio messages. The sound in the output messages will have a 3D effect, based upon your own location and the location of the sound source.
Member Function Documentation
| bool MIPHRIRListen::destroy |
( |
| ) |
|
| int MIPHRIRListen::getSamplingRate |
( |
| ) |
const [inline] |
| bool MIPHRIRListen::getSubjectNumbers |
( |
std::list< int > & |
subjectNumbers, |
|
|
bool |
compensated = true |
|
) |
| |
| bool MIPHRIRListen::init |
( |
const std::string & |
baseDirectory, |
|
|
int |
maxFilterLength = 48, |
|
|
bool |
allowAmbientSound = true, |
|
|
bool |
useDistance = true |
|
) |
| |
This function initializes the 3D audio component.
- Parameters:
-
| baseDirectory | In this directory and its subdirectories, the component will look for WAV files containing data from the LISTEN project. |
| maxFilterLength | If larger than zero, only the first maxFilterLength bytes of left and right filters are used in the convolution product. Can be used to make a tradeoff between 3D sound quality and CPU load. |
| allowAmbientSound | If set to false, messages corresponding to sources for which no positional information can be found are ignored. If set to true, they're simply converted to stereo sound. |
| useDistance | If set to true, the distance of a source is used to adjust the sound amplitude. |
| bool MIPHRIRListen::selectHRIRSet |
( |
int |
subjectNumber, |
|
|
bool |
compensated = true |
|
) |
| |
When multiple HRIR data sets can be found in the base directory specified in the MIPHRIRListen::init function, this function can be used to select a specific set.
- Parameters:
-
| subjectNumber | The subject number belonging to a specific set. |
| compensated | Flag indicated if compensated data or raw data should be used. |
The documentation for this class was generated from the following file: