responsible for all audio signal related tasks.
More...
#include <audio.h>
responsible for all audio signal related tasks.
void Audio::getFilter |
( |
VectorXd * |
filter) | |
|
Returns a filter which can be applied to the MHT.
The filter is composed of the frequency spectrum of the currently playing audio file and a weight function, which the user can manipulate (see updateEQ()).
- Parameters
-
filter | a buffer to which the filter will be written. |
bool Audio::loadSong |
( |
const char * |
path) | |
|
Loads song from specified source and starts playback.
- Parameters
-
path | path to an audio file |
bool Audio::playPause |
( |
) | |
|
Restarts song from beginning.
void Audio::setFreqs |
( |
int |
_numFreqs) | |
|
|
inline |
Sets the number of frequency bands that should be extracted from the audio stream/delivered as filter.
- Parameters
-
_numFreqs | new number of frequency bands |
void Audio::updateEQ |
( |
EQType |
t, |
|
|
int |
val |
|
) |
| |
Updates the equalizer function.
The equalizer function is vector of numHarmonics weights. In [0, numFreqs/4-1] (first fourth) it is a linear interpolation between low/2 and mid*2. In [numFreqs/4, numFreqs-1] (rest) we interpolate between mid*2 and high*10. low, mid and high must range between 0 and 2.
- Parameters
-
t | type of parameter that should be updated |
val | new value for that parameter (must range between 0 and 200, has no effect if t=FREQS) |
FMOD::Channel* Audio::channel |
|
protected |
storage of equalizer function
parameter that influences weight of high frequencies
buffer for frequency spectrum of left channel
parameter that influences weight of low frequencies
parameter that influences weight of midrange frequencies
a duplicate of Config::numFreqs; actually completely useless.
indicates if a song has already been loaded
buffer for frequency spectrum of right channel
FMOD::Sound* Audio::sound |
|
protected |
FMOD::System* Audio::system |
|
protected |
The documentation for this class was generated from the following files: