2016-03-15 05:08:05 -07:00
|
|
|
#ifndef BFORMATDEC_H
|
|
|
|
#define BFORMATDEC_H
|
|
|
|
|
|
|
|
#include "alMain.h"
|
|
|
|
|
|
|
|
struct AmbDecConf;
|
|
|
|
struct BFormatDec;
|
2016-07-30 09:29:21 -07:00
|
|
|
struct AmbiUpsampler;
|
2016-03-15 05:08:05 -07:00
|
|
|
|
2016-03-26 17:52:42 -07:00
|
|
|
enum BFormatDecFlags {
|
|
|
|
BFDF_DistanceComp = 1<<0
|
|
|
|
};
|
|
|
|
|
2016-03-15 05:08:05 -07:00
|
|
|
struct BFormatDec *bformatdec_alloc();
|
|
|
|
void bformatdec_free(struct BFormatDec *dec);
|
2016-03-22 17:52:20 -07:00
|
|
|
int bformatdec_getOrder(const struct BFormatDec *dec);
|
2016-03-26 17:52:42 -07:00
|
|
|
void bformatdec_reset(struct BFormatDec *dec, const struct AmbDecConf *conf, ALuint chancount, ALuint srate, const ALuint chanmap[MAX_OUTPUT_CHANNELS], int flags);
|
2016-03-23 12:53:36 -07:00
|
|
|
|
|
|
|
/* Decodes the ambisonic input to the given output channels. */
|
2016-03-15 05:08:05 -07:00
|
|
|
void bformatdec_process(struct BFormatDec *dec, ALfloat (*restrict OutBuffer)[BUFFERSIZE], ALuint OutChannels, ALfloat (*restrict InSamples)[BUFFERSIZE], ALuint SamplesToDo);
|
|
|
|
|
2016-03-23 12:53:36 -07:00
|
|
|
/* Up-samples a first-order input to the decoder's configuration. */
|
|
|
|
void bformatdec_upSample(struct BFormatDec *dec, ALfloat (*restrict OutBuffer)[BUFFERSIZE], ALfloat (*restrict InSamples)[BUFFERSIZE], ALuint InChannels, ALuint SamplesToDo);
|
|
|
|
|
2016-07-30 09:29:21 -07:00
|
|
|
/* Stand-alone first-order upsampler. Kept here because it shares some stuff
|
|
|
|
* with bformatdec.
|
|
|
|
*/
|
|
|
|
struct AmbiUpsampler *ambiup_alloc();
|
|
|
|
void ambiup_free(struct AmbiUpsampler *ambiup);
|
|
|
|
void ambiup_reset(struct AmbiUpsampler *ambiup, const ALCdevice *device);
|
|
|
|
|
|
|
|
void ambiup_process(struct AmbiUpsampler *ambiup, ALfloat (*restrict OutBuffer)[BUFFERSIZE], ALuint OutChannels, ALfloat (*restrict InSamples)[BUFFERSIZE], ALuint SamplesToDo);
|
|
|
|
|
2016-03-15 05:08:05 -07:00
|
|
|
#endif /* BFORMATDEC_H */
|