EMIPLIB
|
An OpenAL audio output component. More...
#include <mipopenaloutput.h>
Public Member Functions | |
bool | open (int sampRate, int channels, int precision=16) |
Initializes the component. | |
bool | close () |
Closes a previously opened OpenAL audio component. | |
bool | setSourcePosition (uint64_t sourceID, real_t pos[3]) |
Set the position of a particular source. | |
bool | setOwnPosition (real_t pos[3], real_t frontDirection[3], real_t upDirection[3]) |
Set your own position and orientation. |
This component uses the OpenAL audio system to produce 3D audio output. It accepts raw audio messages using signed 16 bit native endian encoding. No messages are generated by the component. TODO's:
bool MIPOpenALOutput::close | ( | ) |
bool MIPOpenALOutput::open | ( | int | sampRate, |
int | channels, | ||
int | precision = 16 |
||
) |
Initializes the component.
sampRate | The sampling rate. |
channels | The number of channels. |
precision | The precision of the samples, specified in bits. Currently, only 16 bit audio messages are supported. |
bool MIPOpenALOutput::setOwnPosition | ( | real_t | pos[3], |
real_t | frontDirection[3], | ||
real_t | upDirection[3] | ||
) |
Using this function, you can store information about your own position and orientation. The frontDirection
and upDirection
vectors need not be orthogonal and need not be normalized.
bool MIPOpenALOutput::setSourcePosition | ( | uint64_t | sourceID, |
real_t | pos[3] | ||
) |
Using this function, you can set the position of a particular source. Uses a right handed Cartesian coordinate system.